aboutsummaryrefslogtreecommitdiff
path: root/src/client/Update.elm
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/Update.elm')
-rw-r--r--src/client/Update.elm15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/client/Update.elm b/src/client/Update.elm
index 3937888..1d0fe95 100644
--- a/src/client/Update.elm
+++ b/src/client/Update.elm
@@ -7,11 +7,14 @@ module Update
import Model exposing (Model)
import Model.Payment exposing (Payments)
import Model.View exposing (..)
+import Model.View.SignIn exposing (..)
+
+import Update.SignIn exposing (..)
type Action =
NoOp
| SignIn
- | UpdateLogin String
+ | UpdateSignIn SignInAction
| UpdatePayments Payments
actions : Signal.Mailbox Action
@@ -23,8 +26,12 @@ updateModel action model =
NoOp ->
model
SignIn ->
- { model | view <- SignInView "" }
- UpdateLogin login ->
- { model | view <- SignInView login }
+ { model | view <- SignInView initSignIn }
+ UpdateSignIn signInAction ->
+ case model.view of
+ SignInView signIn ->
+ { model | view <- SignInView (updateSignIn signInAction signIn) }
+ _ ->
+ model
UpdatePayments payments ->
{ model | view <- PaymentView payments }