aboutsummaryrefslogtreecommitdiff
path: root/src/client/Model
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/Model')
-rw-r--r--src/client/Model/Conf.elm7
-rw-r--r--src/client/Model/Config.elm18
2 files changed, 18 insertions, 7 deletions
diff --git a/src/client/Model/Conf.elm b/src/client/Model/Conf.elm
deleted file mode 100644
index 183fd68..0000000
--- a/src/client/Model/Conf.elm
+++ /dev/null
@@ -1,7 +0,0 @@
-module Model.Conf
- ( Conf
- ) where
-
-type alias Conf =
- { currency : String
- }
diff --git a/src/client/Model/Config.elm b/src/client/Model/Config.elm
new file mode 100644
index 0000000..e47b032
--- /dev/null
+++ b/src/client/Model/Config.elm
@@ -0,0 +1,18 @@
+module Model.Config
+ ( Config
+ , configDecoder
+ ) where
+
+import Json.Decode exposing (..)
+
+type alias Config =
+ { currency : String
+ }
+
+configDecoder : Decoder Config
+configDecoder = object1 Config ("currency" := string)
+
+defaultConfig : Config
+defaultConfig =
+ { currency = "€"
+ }