webmail: more helpful error message when emptying a mailbox that is already empty

and mention in a tooltip too that "empty mailbox" only affects messages in the
mailbox, not submailboxes or their messages.

prompted by a question on matrix/irc
This commit is contained in:
Mechiel Lukkien
2025-01-22 20:09:19 +01:00
parent 315f10d5f2
commit f15f2d68fc
3 changed files with 7 additions and 3 deletions

View File

@ -5157,7 +5157,7 @@ const newMailboxView = (xmb: api.Mailbox, mailboxlistView: MailboxlistView, othe
}),
),
dom.div(
dom.clickbutton('Empty mailbox', async function click() {
dom.clickbutton('Empty mailbox', attr.title('Remove all messages from the mailbox, but not mailboxes inside this mailbox or their messages.'), async function click() {
if (!window.confirm('Are you sure you want to empty this mailbox, permanently removing its messages? Mailboxes inside this mailbox are not affected.')) {
return
}