diff --git a/src/common/misc/TranslationKey.ts b/src/common/misc/TranslationKey.ts index 60da2ae4a31..05bcfa5fd94 100644 --- a/src/common/misc/TranslationKey.ts +++ b/src/common/misc/TranslationKey.ts @@ -1800,5 +1800,4 @@ export type TranslationKeyType = | "yourMessage_label" | "you_label" | "emptyString_msg" - | "editLabel_action" - | "importantLabel_label" + | "confirmDeleteLabel_msg" diff --git a/src/mail-app/mail/view/MailView.ts b/src/mail-app/mail/view/MailView.ts index 941a31bbd86..d0c7e937d75 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 b27c2c34a86..2798c935467 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 86d98bb89b8..a797a3d0dd6 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 184e98105dd..73c4feee944 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}\"?" } }