diff --git a/src/common/misc/TranslationKey.ts b/src/common/misc/TranslationKey.ts index 6e288c8bba02..4792146aca3b 100644 --- a/src/common/misc/TranslationKey.ts +++ b/src/common/misc/TranslationKey.ts @@ -1803,3 +1803,4 @@ export type TranslationKeyType = | "editLabel_action" | "importantLabel_label" | "labelLimitExceeded_msg" + | "confirmDeleteLabel_msg" diff --git a/src/mail-app/mail/view/MailView.ts b/src/mail-app/mail/view/MailView.ts index 941a31bbd862..d0c7e937d755 100644 --- a/src/mail-app/mail/view/MailView.ts +++ b/src/mail-app/mail/view/MailView.ts @@ -799,6 +799,16 @@ export class MailView extends BaseTopLevelView implements TopLevelView + lang.get("confirmDeleteLabel_msg", { + "{1}": label.name, + }), + ) + if (!confirmed) return + await this.mailViewModel.deleteLabel(label) + } + private renderMailboxLabelItems(mailboxDetail: MailboxDetail, inEditMode: boolean, onEditMailbox: () => void): Children { return [ m( @@ -842,7 +852,7 @@ export class MailView extends BaseTopLevelView implements TopLevelView { - this.mailViewModel.deleteLabel(label) + this.showLabelDeleteDialog(label) }, }, ], diff --git a/src/mail-app/translations/de.ts b/src/mail-app/translations/de.ts index 0b2a243637cc..c9a23004a4bd 100644 --- a/src/mail-app/translations/de.ts +++ b/src/mail-app/translations/de.ts @@ -1819,6 +1819,7 @@ export default { "yourCalendars_label": "Deine Kalender", "yourFolders_action": "DEINE ORDNER", "yourMessage_label": "Deine Nachricht", - "you_label": "Du" + "you_label": "Du", + "confirmDeleteLabel_msg": "Möchtest du wirklich das Label \"{1}\" löschen?" } } diff --git a/src/mail-app/translations/de_sie.ts b/src/mail-app/translations/de_sie.ts index a36e9b626b06..de4e39dec383 100644 --- a/src/mail-app/translations/de_sie.ts +++ b/src/mail-app/translations/de_sie.ts @@ -1819,6 +1819,7 @@ export default { "yourCalendars_label": "Deine Kalender", "yourFolders_action": "Ihre ORDNER", "yourMessage_label": "Ihre Nachricht", - "you_label": "Sie" + "you_label": "Sie", + "confirmDeleteLabel_msg": "Möchten Sie wirklich das Label \"{1}\" löschen?" } } diff --git a/src/mail-app/translations/en.ts b/src/mail-app/translations/en.ts index ed581fbebb70..7c3814b646a6 100644 --- a/src/mail-app/translations/en.ts +++ b/src/mail-app/translations/en.ts @@ -1815,6 +1815,7 @@ export default { "yourCalendars_label": "Your calendars", "yourFolders_action": "YOUR FOLDERS", "yourMessage_label": "Your message", - "you_label": "You" + "you_label": "You", + "confirmDeleteLabel_msg": "Are you sure that you want to delete the label \"{1}\"?" } }