summaryrefslogtreecommitdiff
path: root/elm
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2020-06-09 13:30:29 +0200
committerYorhel <git@yorhel.nl>2020-06-09 13:30:31 +0200
commit80ec5124d764e80dbcb916298115d282e7fd4406 (patch)
tree511fadd55649c6bb09ebc536cf87c25e23b5c40b /elm
parentb47afa655a01ec93f09b1e53254fd9b666a33f6d (diff)
Char::Edit: Display warning when setting a specific release
Use cases for that feature are sufficiently rare and often misunderstood that a little warning is in order.
Diffstat (limited to 'elm')
-rw-r--r--elm/CharEdit.elm9
1 files changed, 9 insertions, 0 deletions
diff --git a/elm/CharEdit.elm b/elm/CharEdit.elm
index 7f0b3fae..6d268b21 100644
--- a/elm/CharEdit.elm
+++ b/elm/CharEdit.elm
@@ -475,6 +475,15 @@ view model =
, td [] [ td [ colspan 4, style "padding" "0 15px" ] [ b [ class "standout" ] [ text "List contains duplicate releases." ] ] ]
)
])
+ ++ (if 1 /= List.length (List.filter (\(_,r) -> isJust r.rid) lst) then [] else [
+ ( String.fromInt vid ++ "warn"
+ , tr [] [ td [ colspan 4, style "padding" "0 15px" ]
+ [ b [ class "standout" ] [ text "Note: " ]
+ , text "Only select specific releases if the character has a significantly different role in those releases. "
+ , br [] []
+ , text "If the character's role is mostly the same in all releases (ignoring trials), then just select \"All (full) releases\"." ]
+ ])
+ ])
++ (if List.length lst > List.length rels then [] else [
( String.fromInt vid ++ "add"
, tr [] [ td [ colspan 4 ] [ inputButton "add release" (VnRelAdd vid title) [style "margin" "0 15px"] ] ]