From 071b07463ab3f6894928b13553e98cd47c9ccb18 Mon Sep 17 00:00:00 2001 From: Joris Date: Tue, 28 Jun 2016 00:32:37 +0200 Subject: Add tooltips --- src/client/elm/Model.elm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/client/elm/Model.elm') 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) -- cgit v1.2.3