diff --git a/src/Page.elm b/src/Page.elm index 69a84e8..480978e 100644 --- a/src/Page.elm +++ b/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 "" - ] - :: content + [ viewSessionBar (maybeSession page) [ controls ] + , div [ class "section" ] + 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) ] ] diff --git a/src/Page/GroupChest.elm b/src/Page/GroupChest.elm index fb88379..37da645 100644 --- a/src/Page/GroupChest.elm +++ b/src/Page/GroupChest.elm @@ -77,7 +77,7 @@ view model = button [ class "button" , onClick - (GotChestMsg <| Chest.showWithClaims (getClaimsFromSession model.session)) + (GotChestMsg <| Chest.claim (getClaimsFromSession model.session)) ] [ text "Demander" ] diff --git a/src/Wealth.elm b/src/Wealth.elm index f05f3d7..b74213c 100644 --- a/src/Wealth.elm +++ b/src/Wealth.elm @@ -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 =