diff options
author | Yorhel <git@yorhel.nl> | 2019-12-16 12:48:16 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2019-12-16 12:48:18 +0100 |
commit | 829eb1f2472936d70a70839e55b16858dbcfb6af (patch) | |
tree | 20b3344078af77a9face7c4af3c4e866eec5662a /elm | |
parent | c6fc20d5e878ed0f952bdb5eb7fc8f783a873966 (diff) |
ulist: Add "voted = private" warning
Because I suspect that the current behavior may be confusing in a few
scenarios, especially when marking the "Voted" label as private.
Diffstat (limited to 'elm')
-rw-r--r-- | elm/UList/ManageLabels.elm | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/elm/UList/ManageLabels.elm b/elm/UList/ManageLabels.elm index c3e996f8..ab058d99 100644 --- a/elm/UList/ManageLabels.elm +++ b/elm/UList/ManageLabels.elm @@ -106,14 +106,22 @@ view model = , td [] [ text "Private" ] , td [] [ ] ] ] - , tfoot [] [ tr [] - [ td [] [] - , td [ colspan 3 ] - [ a [ onClick Add ] [ text "New label" ] - --, inputButton "Save changes" Noop [] - , submitButton "Save changes" model.state True + , tfoot [] + [ if List.any (\l -> l.id == 7 && l.private) model.labels && List.any (\l -> not l.private) model.labels + then tr [] [ td [ colspan 4 ] + [ b [ class "standout" ] [ text "WARNING: " ] + , text "Your vote is still public if you assign a non-private label to the visual novel." + ] ] + else text "" + , tr [] + [ td [] [] + , td [ colspan 3 ] + [ a [ onClick Add ] [ text "New label" ] + --, inputButton "Save changes" Noop [] + , submitButton "Save changes" model.state True + ] ] - ] ] + ] , tbody [] <| List.indexedMap item model.labels ] ] |