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

@ -5486,7 +5486,7 @@ const newMailboxView = (xmb, mailboxlistView, otherMailbox) => {
}
remove();
await withStatus('Deleting mailbox', client.MailboxDelete(mbv.mailbox.ID));
})), dom.div(dom.clickbutton('Empty mailbox', async function click() {
})), dom.div(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;
}