From 302a2e798f10e61c129753a2bd11634420c1f1a1 Mon Sep 17 00:00:00 2001 From: Joris Date: Sat, 2 Jan 2016 20:31:25 +0100 Subject: Set a spinner for sign in --- src/client/elm/Model/Action.elm | 1 + src/client/elm/Model/Action/SignInAction.elm | 3 ++- src/client/elm/Model/View/SignInView.elm | 8 ++++---- 3 files changed, 7 insertions(+), 5 deletions(-) (limited to 'src/client/elm/Model') diff --git a/src/client/elm/Model/Action.elm b/src/client/elm/Model/Action.elm index 9d5d125..d0fe597 100644 --- a/src/client/elm/Model/Action.elm +++ b/src/client/elm/Model/Action.elm @@ -15,6 +15,7 @@ import Model.Communication exposing (Communication) type Action = NoOp | ServerCommunication Communication + | SignIn String | UpdateTime Time | GoSignInView | GoLoggedInView Users UserId Payments Payments Int Payers diff --git a/src/client/elm/Model/Action/SignInAction.elm b/src/client/elm/Model/Action/SignInAction.elm index 6673c11..ed64c1d 100644 --- a/src/client/elm/Model/Action/SignInAction.elm +++ b/src/client/elm/Model/Action/SignInAction.elm @@ -3,4 +3,5 @@ module Model.Action.SignInAction ) where type SignInAction = - ErrorLogin String + Connecting + | ErrorLogin String diff --git a/src/client/elm/Model/View/SignInView.elm b/src/client/elm/Model/View/SignInView.elm index 0fbce39..cf7e6b2 100644 --- a/src/client/elm/Model/View/SignInView.elm +++ b/src/client/elm/Model/View/SignInView.elm @@ -4,12 +4,12 @@ module Model.View.SignInView ) where type alias SignInView = - { login : String - , result : Maybe (Result String String) + { connecting : Bool + , error : Maybe String } initSignInView : SignInView initSignInView = - { login = "" - , result = Nothing + { connecting = False + , error = Nothing } -- cgit v1.2.3