|author||Yorhel <email@example.com>||2020-07-12 09:41:08 +0200|
|committer||Yorhel <firstname.lastname@example.org>||2020-07-12 09:41:10 +0200|
VN::Edit: Allow screenshot editing if there are screens but no releases
To allow deletion of screenshots after all releases have been removed. The cast edit function already has a similar check.
Diffstat (limited to 'elm')
1 files changed, 1 insertions, 1 deletions
diff --git a/elm/VNEdit.elm b/elm/VNEdit.elm
index 94020dfb..4e442815 100644
@@ -547,7 +547,7 @@ view model =
if model.id == Nothing
then text <| "Screenshots can be uploaded to this visual novel once it has a release entry associated with it. "
++ "To do so, first create this entry without screenshots, then create the appropriate release entries, and finally come back to this form by editing the visual novel."
- else if List.isEmpty model.releases
+ else if List.isEmpty model.screenshots && List.isEmpty model.releases
then p 
[ text "This visual novel does not have any releases associated with it (yet). Please "
, a [ href <| "/v" ++ Maybe.withDefault "" (Maybe.map String.fromInt model.id) ++ "/add" ] [ text "add the appropriate release entries" ]