aboutsummaryrefslogtreecommitdiff
path: root/src/client/Update
diff options
context:
space:
mode:
authorJoris Guyonvarch2015-07-19 17:28:19 +0200
committerJoris Guyonvarch2015-07-19 17:28:19 +0200
commit331d506281760ac62e8f1715ef729e1b2a91e280 (patch)
treea26e49d9a41de26fbb5602b293f44c5f7f592efc /src/client/Update
parent0d589e12a0c32936303de46b1e462dd19648170d (diff)
Showing either error or success message at sign in page
Diffstat (limited to 'src/client/Update')
-rw-r--r--src/client/Update/SignIn.elm9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/client/Update/SignIn.elm b/src/client/Update/SignIn.elm
index a962f90..0e118dc 100644
--- a/src/client/Update/SignIn.elm
+++ b/src/client/Update/SignIn.elm
@@ -7,9 +7,18 @@ import Model.View.SignIn exposing (..)
type SignInAction =
UpdateLogin String
+ | ValidLogin String
+ | ErrorLogin String
updateSignIn : SignInAction -> SignIn -> SignIn
updateSignIn action signIn =
case action of
UpdateLogin login ->
{ signIn | login <- login }
+ ValidLogin message ->
+ { signIn
+ | login <- ""
+ , result <- Just (Ok message)
+ }
+ ErrorLogin message ->
+ { signIn | result <- Just (Err message) }