From 5bfd349bedb9c395cbeb38bb888e379ba36d5d35 Mon Sep 17 00:00:00 2001 From: Joris Date: Wed, 30 Dec 2015 17:01:56 +0100 Subject: Minor design modifications --- src/client/elm/Model/View/LoggedIn/Add.elm | 2 +- src/client/elm/View/Header.elm | 12 +++--------- src/client/elm/View/SignIn.elm | 10 +++++++++- 3 files changed, 13 insertions(+), 11 deletions(-) (limited to 'src/client') diff --git a/src/client/elm/Model/View/LoggedIn/Add.elm b/src/client/elm/Model/View/LoggedIn/Add.elm index 5598084..c25c640 100644 --- a/src/client/elm/Model/View/LoggedIn/Add.elm +++ b/src/client/elm/Model/View/LoggedIn/Add.elm @@ -38,6 +38,6 @@ validateCost : String -> Translations -> Result String Int validateCost cost translations = cost |> validateNonEmpty (getMessage "CostRequired" translations) - |> flip Result.andThen (validateNumber (getMessage "CostMustBeNonNullNumber" translations) ((/=) 0)) + |> flip Result.andThen (validateNumber (getMessage "CostRequired" translations) ((/=) 0)) type Frequency = Punctual | Monthly diff --git a/src/client/elm/View/Header.elm b/src/client/elm/View/Header.elm index 3a6241b..94bdb01 100644 --- a/src/client/elm/View/Header.elm +++ b/src/client/elm/View/Header.elm @@ -22,18 +22,12 @@ renderHeader model = [] [ text (getMessage "SharedCost" model.translations) ] , case model.view of - LoadingView -> - text "" - SignInView _ -> - button - [ class "icon" - , onClick operations.address Persona.SignIn - ] - [ renderIcon "sign-in" ] LoggedInView _ -> button [ class "icon" , onClick operations.address Persona.SignOut ] - [ renderIcon "sign-out" ] + [ renderIcon "power-off" ] + _ -> + text "" ] diff --git a/src/client/elm/View/SignIn.elm b/src/client/elm/View/SignIn.elm index 8fcac16..d35d655 100644 --- a/src/client/elm/View/SignIn.elm +++ b/src/client/elm/View/SignIn.elm @@ -14,17 +14,25 @@ import Update.SignIn exposing (..) import ServerCommunication as SC import ServerCommunication exposing (serverCommunications) +import Persona exposing (operations) + import Model exposing (Model) import Model.View.SignInView exposing (..) import Model.Translations exposing (getMessage) import View.Events exposing (onSubmitPrevDefault) +import View.Icon exposing (renderIcon) renderSignIn : Model -> SignInView -> Html renderSignIn model signInView = div [ class "signIn" ] - [ div + [ button + [ onClick operations.address Persona.SignIn ] + [ span [] [ text (getMessage "SignIn" model.translations) ] + , renderIcon "plug" + ] + , div [ class "result" ] [ signInResult model signInView ] ] -- cgit v1.2.3