aboutsummaryrefslogtreecommitdiff
path: root/src/client/elm/Model
diff options
context:
space:
mode:
authorJoris2016-03-27 19:44:40 +0200
committerJoris2016-03-27 19:44:40 +0200
commit5f6c66e4c3cf02e5b1c0a1fac6036b86be06a992 (patch)
tree510b3b65d13a8003b092b4c9fe62f6456750cd38 /src/client/elm/Model
parent9b7546b99411a8364eccf6b0262a3c0c7d82380c (diff)
Regroup signIn modules
Diffstat (limited to 'src/client/elm/Model')
-rw-r--r--src/client/elm/Model/Action.elm5
-rw-r--r--src/client/elm/Model/Action/SignInAction.elm9
-rw-r--r--src/client/elm/Model/View.elm5
-rw-r--r--src/client/elm/Model/View/SignInView.elm17
4 files changed, 6 insertions, 30 deletions
diff --git a/src/client/elm/Model/Action.elm b/src/client/elm/Model/Action.elm
index 60c1aca..3d06521 100644
--- a/src/client/elm/Model/Action.elm
+++ b/src/client/elm/Model/Action.elm
@@ -5,16 +5,17 @@ module Model.Action
import Time exposing (Time)
import Signal exposing (Address)
-import Model.Action.SignInAction exposing (SignInAction)
import Model.Action.LoggedInAction exposing (LoggedInAction)
import Model.Init exposing (Init)
+import SignIn.Action as SignInAction
+
type Action =
NoOp
| SignIn String
| UpdateTime Time
| GoLoggedInView Init
- | UpdateSignIn SignInAction
+ | UpdateSignIn SignInAction.Action
| UpdateLoggedIn LoggedInAction
| GoSignInView
| SignOut
diff --git a/src/client/elm/Model/Action/SignInAction.elm b/src/client/elm/Model/Action/SignInAction.elm
deleted file mode 100644
index bead018..0000000
--- a/src/client/elm/Model/Action/SignInAction.elm
+++ /dev/null
@@ -1,9 +0,0 @@
-module Model.Action.SignInAction
- ( SignInAction(..)
- ) where
-
-type SignInAction =
- UpdateLogin String
- | WaitingServer
- | ValidLogin
- | ErrorLogin String
diff --git a/src/client/elm/Model/View.elm b/src/client/elm/Model/View.elm
index 90c0e53..7fc42af 100644
--- a/src/client/elm/Model/View.elm
+++ b/src/client/elm/Model/View.elm
@@ -3,10 +3,11 @@ module Model.View
) where
import Model.Payment exposing (Payments)
-import Model.View.SignInView exposing (..)
import Model.View.LoggedInView exposing (..)
+import SignIn.Model as SignInModel
+
type View =
LoadingView
- | SignInView SignInView
+ | SignInView SignInModel.Model
| LoggedInView LoggedInView
diff --git a/src/client/elm/Model/View/SignInView.elm b/src/client/elm/Model/View/SignInView.elm
deleted file mode 100644
index f72d05a..0000000
--- a/src/client/elm/Model/View/SignInView.elm
+++ /dev/null
@@ -1,17 +0,0 @@
-module Model.View.SignInView
- ( SignInView
- , initSignInView
- ) where
-
-type alias SignInView =
- { login : String
- , waitingServer : Bool
- , result : Maybe (Result String String)
- }
-
-initSignInView : Maybe String -> SignInView
-initSignInView mbSignInError =
- { login = ""
- , waitingServer = False
- , result = Maybe.map Err mbSignInError
- }