From a6727f104f808e533052f2bd83bc89cd6bfa0522 Mon Sep 17 00:00:00 2001 From: Joris Guyonvarch Date: Sun, 19 Jul 2015 00:45:42 +0200 Subject: Adding UI to sign in and sign out --- src/client/Update.elm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/client/Update.elm') diff --git a/src/client/Update.elm b/src/client/Update.elm index b96d899..3937888 100644 --- a/src/client/Update.elm +++ b/src/client/Update.elm @@ -6,10 +6,12 @@ module Update import Model exposing (Model) import Model.Payment exposing (Payments) +import Model.View exposing (..) type Action = NoOp - | Forbidden + | SignIn + | UpdateLogin String | UpdatePayments Payments actions : Signal.Mailbox Action @@ -20,7 +22,9 @@ updateModel action model = case action of NoOp -> model - Forbidden -> - { model | forbiddenAccess <- True } + SignIn -> + { model | view <- SignInView "" } + UpdateLogin login -> + { model | view <- SignInView login } UpdatePayments payments -> - { model | payments <- Just payments } + { model | view <- PaymentView payments } -- cgit v1.2.3