diff options
Diffstat (limited to 'src/client/Model.elm')
-rw-r--r-- | src/client/Model.elm | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/client/Model.elm b/src/client/Model.elm index c330d86..43a19c5 100644 --- a/src/client/Model.elm +++ b/src/client/Model.elm @@ -8,22 +8,25 @@ import Json.Decode as Json import Model.View exposing (..) import Model.Translations exposing (..) -import Model.Conf exposing (..) +import Model.Config exposing (..) type alias Model = { view : View , currentTime : Time , translations : Translations - , conf : Conf + , config : Config } -initialModel : Time -> String -> Model -initialModel initialTime translationsValue = +initialModel : Time -> String -> String -> Model +initialModel initialTime translationsValue configValue = { view = LoadingView , currentTime = initialTime , translations = case Json.decodeString translationsDecoder translationsValue of Ok translations -> translations Err err -> [] - , conf = { currency = "€" } + , config = + case Json.decodeString configDecoder configValue of + Ok config -> config + Err err -> { currency = "" } } |