diff options
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/elm/View/Header.elm | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/src/client/elm/View/Header.elm b/src/client/elm/View/Header.elm index b8a5bf1..b49cf74 100644 --- a/src/client/elm/View/Header.elm +++ b/src/client/elm/View/Header.elm @@ -3,6 +3,7 @@ module View.Header ) where import Signal exposing (Address) +import Dict import Html exposing (..) import Html.Attributes exposing (..) @@ -19,16 +20,29 @@ renderHeader : Address Action -> Model -> Html renderHeader address model = header [] - [ h1 - [] - [ text (getMessage "SharedCost" model.translations) ] + [ button + [ class "title" ] + [ h1 + [] + [ text (getMessage "SharedCost" model.translations) ] + ] , case model.view of - LoggedInView _ -> - button - [ class "icon" - , onClick address SignOut + LoggedInView { users, account } -> + div + [ class "signedPanel" ] + [ button + [ class "user" ] + [ Dict.get account.me users + |> Maybe.map .name + |> Maybe.withDefault "" + |> text + ] + , button + [ class "icon" + , onClick address SignOut + ] + [ renderIcon "power-off" ] ] - [ renderIcon "power-off" ] _ -> text "" ] |