@bobfrankston/rmfmail 1.1.245 → 1.1.246
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/app.bundle.js +16 -4
- package/client/app.bundle.js.map +2 -2
- package/client/app.js +34 -17
- package/client/app.js.map +1 -1
- package/client/app.ts +31 -16
- package/package.json +3 -3
package/client/app.ts
CHANGED
|
@@ -1466,14 +1466,25 @@ async function deleteSelectedMessages(): Promise<void> {
|
|
|
1466
1466
|
selected.push({ accountId: current.accountId, uid: current.message.uid, folderId: current.message.folderId });
|
|
1467
1467
|
}
|
|
1468
1468
|
|
|
1469
|
-
//
|
|
1470
|
-
//
|
|
1471
|
-
//
|
|
1472
|
-
//
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1469
|
+
// Deleting a message that is ALREADY in Trash is a PERMANENT expunge, not
|
|
1470
|
+
// a move — the service's trashMessage returns "expunged" in that case. So
|
|
1471
|
+
// the prompt and the undo promise must change: permanent delete always
|
|
1472
|
+
// confirms (even a single message) and can't be undone (Bob 2026-06-12).
|
|
1473
|
+
const inTrash = currentFolderSpecialUse === "trash";
|
|
1474
|
+
|
|
1475
|
+
// SAFETY GATE.
|
|
1476
|
+
// - In Trash: any delete is permanent → always confirm, warn it's final.
|
|
1477
|
+
// - Elsewhere: a single delete is instant (quick triage); a BULK delete
|
|
1478
|
+
// confirms, because `Ctrl+A` selects every visible row and in All
|
|
1479
|
+
// Inboxes that's a scattered screenful — exactly what silently trashed
|
|
1480
|
+
// 114 of Bob's messages on 2026-06-12.
|
|
1481
|
+
const n = selected.length;
|
|
1482
|
+
if (inTrash) {
|
|
1483
|
+
if (!confirm(`Permanently delete ${n} message${n === 1 ? "" : "s"} from Trash?\n\nThis cannot be undone.`)) {
|
|
1484
|
+
return;
|
|
1485
|
+
}
|
|
1486
|
+
} else if (n > 1) {
|
|
1487
|
+
if (!confirm(`Move ${n} messages to Trash?\n\n(Ctrl+Z restores them if this was a mistake.)`)) {
|
|
1477
1488
|
return;
|
|
1478
1489
|
}
|
|
1479
1490
|
}
|
|
@@ -1489,14 +1500,18 @@ async function deleteSelectedMessages(): Promise<void> {
|
|
|
1489
1500
|
const snapshot = [...selected];
|
|
1490
1501
|
removeMessagesAndReconcile(selected);
|
|
1491
1502
|
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
:
|
|
1503
|
+
if (inTrash) {
|
|
1504
|
+
// Permanent — no undo entry (there's nothing to restore to).
|
|
1505
|
+
if (statusSync) statusSync.textContent = `Permanently deleted ${n} message${n === 1 ? "" : "s"}`;
|
|
1506
|
+
} else {
|
|
1507
|
+
// Undo restores the WHOLE batch, not just the first message — a bulk
|
|
1508
|
+
// delete must be fully recoverable via Ctrl+Z (the old single-slot undo
|
|
1509
|
+
// left the other N-1 unrecoverable; Bob 2026-06-12).
|
|
1510
|
+
pushUndo({ kind: "delete", at: Date.now(), payload: snapshot.map(m => ({ ...m, subject: "" })) });
|
|
1511
|
+
if (statusSync) statusSync.textContent = n === 1
|
|
1512
|
+
? `Trashed 1 message (syncing) — Ctrl+Z to undo`
|
|
1513
|
+
: `Trashed ${n} messages (syncing) — Ctrl+Z to undo`;
|
|
1514
|
+
}
|
|
1500
1515
|
|
|
1501
1516
|
// Fire-and-forget per local-first: optimistic remove above already
|
|
1502
1517
|
// updated the UI; the daemon-side trash is sync DB + queued IMAP.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bobfrankston/rmfmail",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.246",
|
|
4
4
|
"description": "Local-first email client with IMAP sync and standalone native app",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "bin/mailx.js",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@bobfrankston/iflow-direct": "^0.1.53",
|
|
40
40
|
"@bobfrankston/mailx-host": "^0.1.13",
|
|
41
|
-
"@bobfrankston/mailx-imap": "^0.1.
|
|
41
|
+
"@bobfrankston/mailx-imap": "^0.1.90",
|
|
42
42
|
"@bobfrankston/mailx-store-web": "^0.1.27",
|
|
43
43
|
"@bobfrankston/mailx-sync": "^0.1.22",
|
|
44
44
|
"@bobfrankston/miscinfo": "^1.0.13",
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
"dependencies": {
|
|
119
119
|
"@bobfrankston/iflow-direct": "^0.1.53",
|
|
120
120
|
"@bobfrankston/mailx-host": "^0.1.13",
|
|
121
|
-
"@bobfrankston/mailx-imap": "^0.1.
|
|
121
|
+
"@bobfrankston/mailx-imap": "^0.1.90",
|
|
122
122
|
"@bobfrankston/mailx-store-web": "^0.1.27",
|
|
123
123
|
"@bobfrankston/mailx-sync": "^0.1.22",
|
|
124
124
|
"@bobfrankston/miscinfo": "^1.0.13",
|