little fixes
This commit is contained in:
43
src/Page.elm
43
src/Page.elm
@@ -118,22 +118,10 @@ view page =
|
||||
( title
|
||||
, { title = navbarTitle, links = navbarLinks }
|
||||
, [ div [ class "container" ] <|
|
||||
viewSessionBar (maybeSession page) [ controls ]
|
||||
:: div [ class "section" ]
|
||||
[ case Maybe.map Session.notification (maybeSession page) of
|
||||
Just (Just t) ->
|
||||
viewNotification NotifySuccess t
|
||||
|
||||
_ ->
|
||||
text ""
|
||||
, case Maybe.map Session.error (maybeSession page) of
|
||||
Just (Just t) ->
|
||||
viewNotification NotifyError t
|
||||
|
||||
_ ->
|
||||
text ""
|
||||
[ viewSessionBar (maybeSession page) [ controls ]
|
||||
, div [ class "section" ]
|
||||
content
|
||||
]
|
||||
:: content
|
||||
]
|
||||
)
|
||||
|
||||
@@ -153,8 +141,12 @@ viewNotification kind content =
|
||||
NotifyError ->
|
||||
"is-danger"
|
||||
in
|
||||
div [ class ("notification " ++ className) ]
|
||||
[ text content ]
|
||||
div [ class "level-item" ]
|
||||
[ span [ class ("tag " ++ className) ]
|
||||
[ text content
|
||||
, a [ class "delete" ] []
|
||||
]
|
||||
]
|
||||
|
||||
|
||||
viewSessionBar session controls =
|
||||
@@ -183,10 +175,25 @@ viewSessionBar session controls =
|
||||
|
||||
Just Session.Admin ->
|
||||
[ text "Admin" ]
|
||||
|
||||
notifications =
|
||||
[ case Maybe.map Session.notification session of
|
||||
Just (Just t) ->
|
||||
viewNotification NotifySuccess t
|
||||
|
||||
_ ->
|
||||
text ""
|
||||
, case Maybe.map Session.error session of
|
||||
Just (Just t) ->
|
||||
viewNotification NotifyError t
|
||||
|
||||
_ ->
|
||||
text ""
|
||||
]
|
||||
in
|
||||
section [ class "hero is-dark is-bold" ]
|
||||
[ div [ class "hero-body" ]
|
||||
[ renderLevel user controls ]
|
||||
[ renderLevel user (notifications ++ controls) ]
|
||||
]
|
||||
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ view model =
|
||||
button
|
||||
[ class "button"
|
||||
, onClick
|
||||
(GotChestMsg <| Chest.showWithClaims (getClaimsFromSession model.session))
|
||||
(GotChestMsg <| Chest.claim (getClaimsFromSession model.session))
|
||||
]
|
||||
[ text "Demander" ]
|
||||
|
||||
|
||||
@@ -26,7 +26,9 @@ view wealth model =
|
||||
Edit amount ->
|
||||
viewUpdateWealth amount
|
||||
)
|
||||
++ [ span [ class "icon", onClick StartEdit ] [ i [ class "fas fa-tools" ] [] ] ]
|
||||
++ [ div [ class "level-item" ]
|
||||
[ span [ class "icon", onClick StartEdit ] [ i [ class "fas fa-tools" ] [] ] ]
|
||||
]
|
||||
|
||||
|
||||
viewUpdateWealth amount =
|
||||
|
||||
Reference in New Issue
Block a user