Skip to content

Commit

Permalink
Improve delete folder message in DT editor
Browse files Browse the repository at this point in the history
  • Loading branch information
janslifka committed Dec 16, 2024
1 parent 29587ce commit dfc1077
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1511,11 +1511,19 @@ viewDeleteModal appState model =
let
fileName =
getSelectedName model

message =
case model.selected of
SelectedFolder _ ->
gettext "Are you sure you want to permanently delete %s and all its contents?" appState.locale

_ ->
gettext "Are you sure you want to permanently delete %s?" appState.locale
in
Modal.confirm appState
{ modalTitle = "Delete"
, modalContent =
String.formatHtml (gettext "Are you sure you want to permanently delete %s?" appState.locale)
String.formatHtml message
[ strong [] [ text (Maybe.withDefault "" fileName) ] ]
, visible = model.deleteModalOpen && Maybe.isJust fileName
, actionResult = model.deleting
Expand Down

0 comments on commit dfc1077

Please sign in to comment.