aboutsummaryrefslogtreecommitdiff
path: root/src/client/elm/Model.elm
diff options
context:
space:
mode:
authorJoris2016-06-28 00:32:37 +0200
committerJoris2016-06-29 20:34:05 +0200
commit071b07463ab3f6894928b13553e98cd47c9ccb18 (patch)
treefad6e7f6c8e9aa730f7c113868debc1812795cc9 /src/client/elm/Model.elm
parentf605541cbaaa3c339eef8f345547bcd653d3f721 (diff)
downloadbudget-071b07463ab3f6894928b13553e98cd47c9ccb18.tar.gz
budget-071b07463ab3f6894928b13553e98cd47c9ccb18.tar.bz2
budget-071b07463ab3f6894928b13553e98cd47c9ccb18.zip
Add tooltips
Diffstat (limited to 'src/client/elm/Model.elm')
-rw-r--r--src/client/elm/Model.elm9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/client/elm/Model.elm b/src/client/elm/Model.elm
index 0cd714f..aa4b314 100644
--- a/src/client/elm/Model.elm
+++ b/src/client/elm/Model.elm
@@ -18,11 +18,13 @@ import Model.Conf exposing (..)
import Model.InitResult exposing (..)
import LoggedIn.Model as LoggedInModel
import SignIn.Model as SignInModel
-import Dialog
+import Dialog
import Dialog.Model as DialogModel
import Dialog.Msg as DialogMsg
+import Tooltip
+
import Utils.Maybe exposing (isJust)
type alias Model =
@@ -32,6 +34,7 @@ type alias Model =
, conf : Conf
, page : Page
, dialog : Dialog.Model DialogModel.Model DialogMsg.Msg Msg
+ , tooltip : Tooltip.Model
}
init : Json.Value -> Result String Page -> (Model, Cmd Msg)
@@ -42,7 +45,7 @@ init payload result =
Ok page -> page
model =
case Json.decodeValue Init.decoder payload of
- Ok { time, translations, conf, result } ->
+ Ok { time, translations, conf, result, windowSize } ->
{ view =
case result of
InitEmpty ->
@@ -56,6 +59,7 @@ init payload result =
, conf = conf
, page = page
, dialog = Dialog.init DialogModel.init Msg.Dialog
+ , tooltip = Tooltip.init windowSize.width windowSize.height
}
Err error ->
{ view = SignInView (SignInModel.init (Just error))
@@ -64,5 +68,6 @@ init payload result =
, conf = { currency = "" }
, page = page
, dialog = Dialog.init DialogModel.init Msg.Dialog
+ , tooltip = Tooltip.init 0 0
}
in (model, Cmd.none)