aboutsummaryrefslogtreecommitdiff
path: root/src/client/elm/SignIn/View.elm
diff options
context:
space:
mode:
authorJoris2016-06-03 20:27:16 +0200
committerJoris2016-06-03 20:27:16 +0200
commit8e3a7bf1cb83bbb6e3dcd54308eefa52a29cd679 (patch)
treed6ba0985a534a0e2e317b1edb0d4c999119d87ff /src/client/elm/SignIn/View.elm
parent3a88115d118f8256f3ff034dc359df42a9e4051c (diff)
downloadbudget-8e3a7bf1cb83bbb6e3dcd54308eefa52a29cd679.tar.gz
budget-8e3a7bf1cb83bbb6e3dcd54308eefa52a29cd679.tar.bz2
budget-8e3a7bf1cb83bbb6e3dcd54308eefa52a29cd679.zip
Migrate to elm 0.17
Diffstat (limited to 'src/client/elm/SignIn/View.elm')
-rw-r--r--src/client/elm/SignIn/View.elm19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/client/elm/SignIn/View.elm b/src/client/elm/SignIn/View.elm
index d81d63a..2cec586 100644
--- a/src/client/elm/SignIn/View.elm
+++ b/src/client/elm/SignIn/View.elm
@@ -1,34 +1,33 @@
-module SignIn.View
+module SignIn.View exposing
( view
- ) where
+ )
import Html as H exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
-import Signal exposing (Address)
import Json.Decode as Json
-import SignIn.Action as SignInAction
+import SignIn.Msg as SignInMsg
import SignIn.Model as SignInModel
import Update exposing (..)
import Model exposing (Model)
-import Action exposing (..)
+import Msg exposing (..)
import Model.Translations exposing (getMessage)
import View.Events exposing (onSubmitPrevDefault)
import View.Icon exposing (renderSpinIcon)
-view : Address Action -> Model -> SignInModel.Model -> Html
-view address model signInModel =
+view : Model -> SignInModel.Model -> Html Msg
+view model signInModel =
div
[ class "signIn" ]
[ H.form
- [ onSubmitPrevDefault address (SignIn signInModel.login) ]
+ [ onSubmitPrevDefault (SignIn signInModel.login) ]
[ input
[ value signInModel.login
- , on "input" targetValue (Signal.message address << UpdateSignIn << SignInAction.UpdateLogin)
+ , on "input" (targetValue |> (Json.map <| (UpdateSignIn << SignInMsg.UpdateLogin)))
, name "email"
]
[]
@@ -44,7 +43,7 @@ view address model signInModel =
[ signInResult model signInModel ]
]
-signInResult : Model -> SignInModel.Model -> Html
+signInResult : Model -> SignInModel.Model -> Html Msg
signInResult model signInModel =
case signInModel.result of
Just result ->