aboutsummaryrefslogtreecommitdiff
path: root/src/client/elm/Update
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/elm/Update')
-rw-r--r--src/client/elm/Update/SignIn.elm18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/client/elm/Update/SignIn.elm b/src/client/elm/Update/SignIn.elm
index 94963c8..f55ce6d 100644
--- a/src/client/elm/Update/SignIn.elm
+++ b/src/client/elm/Update/SignIn.elm
@@ -2,16 +2,28 @@ module Update.SignIn
( updateSignIn
) where
-import Model.Action.SignInAction exposing (..)
import Model.View.SignInView exposing (..)
+import Model.Action.SignInAction exposing (..)
updateSignIn : SignInAction -> SignInView -> SignInView
updateSignIn action signInView =
case action of
+ UpdateLogin login ->
+ { signInView |
+ login = login
+ }
WaitingServer ->
- { signInView | waitingServer = True }
+ { signInView
+ | waitingServer = True
+ }
+ ValidLogin message ->
+ { signInView
+ | login = ""
+ , result = Just (Ok message)
+ , waitingServer = False
+ }
ErrorLogin message ->
{ signInView
- | error = Just message
+ | result = Just (Err message)
, waitingServer = False
}