@bobfrankston/rmfmail 1.1.243 → 1.1.245
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 +14 -9
- package/client/app.bundle.js.map +2 -2
- package/client/app.js +30 -17
- package/client/app.js.map +1 -1
- package/client/app.ts +31 -15
- package/client/compose/compose.bundle.js +145 -518
- package/client/compose/compose.bundle.js.map +3 -3
- package/client/compose/spellcheck.js +209 -758
- package/client/compose/spellcheck.js.map +1 -1
- package/client/compose/spellcheck.ts +209 -707
- package/package.json +5 -5
- package/packages/mailx-imap/index.d.ts.map +1 -1
- package/packages/mailx-imap/index.js +15 -0
- package/packages/mailx-imap/index.js.map +1 -1
- package/packages/mailx-imap/index.ts +12 -0
- package/packages/mailx-imap/package-lock.json +2 -2
- package/packages/mailx-imap/package.json +1 -1
package/client/app.js
CHANGED
|
@@ -1490,6 +1490,17 @@ async function deleteSelectedMessages() {
|
|
|
1490
1490
|
return;
|
|
1491
1491
|
selected.push({ accountId: current.accountId, uid: current.message.uid, folderId: current.message.folderId });
|
|
1492
1492
|
}
|
|
1493
|
+
// SAFETY GATE: confirm before a BULK delete. `Ctrl+A` selects every
|
|
1494
|
+
// visible row, and in the "All Inboxes" view that's a scattered screenful
|
|
1495
|
+
// across accounts — so a single Ctrl+A then Delete could silently trash
|
|
1496
|
+
// dozens of messages with no prompt. That is exactly what trashed 114 of
|
|
1497
|
+
// Bob's messages on 2026-06-12. A single-message delete (the common quick-
|
|
1498
|
+
// triage case) stays instant; anything larger must be confirmed.
|
|
1499
|
+
if (selected.length > 1) {
|
|
1500
|
+
if (!confirm(`Move ${selected.length} messages to Trash?\n\n(Ctrl+Z restores them if this was a mistake.)`)) {
|
|
1501
|
+
return;
|
|
1502
|
+
}
|
|
1503
|
+
}
|
|
1493
1504
|
const statusSync = document.getElementById("status-sync");
|
|
1494
1505
|
// Optimistic UI: remove from list IMMEDIATELY, then queue the IPC.
|
|
1495
1506
|
// Old order awaited the daemon round-trip (IPC + DB updates) before
|
|
@@ -1499,20 +1510,15 @@ async function deleteSelectedMessages() {
|
|
|
1499
1510
|
// re-populates the row and the catch block surfaces the error.
|
|
1500
1511
|
const snapshot = [...selected];
|
|
1501
1512
|
removeMessagesAndReconcile(selected);
|
|
1502
|
-
// Undo
|
|
1503
|
-
//
|
|
1504
|
-
//
|
|
1505
|
-
//
|
|
1506
|
-
|
|
1507
|
-
if (
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
}
|
|
1512
|
-
else {
|
|
1513
|
-
if (statusSync)
|
|
1514
|
-
statusSync.textContent = `Trashed ${snapshot.length} messages (syncing)`;
|
|
1515
|
-
}
|
|
1513
|
+
// Undo restores the WHOLE batch, not just the first message — a bulk
|
|
1514
|
+
// delete must be fully recoverable via Ctrl+Z (the old single-slot undo
|
|
1515
|
+
// left the other N-1 unrecoverable, which made an accidental mass-delete
|
|
1516
|
+
// unrecoverable; Bob 2026-06-12).
|
|
1517
|
+
pushUndo({ kind: "delete", at: Date.now(), payload: snapshot.map(m => ({ ...m, subject: "" })) });
|
|
1518
|
+
if (statusSync)
|
|
1519
|
+
statusSync.textContent = snapshot.length === 1
|
|
1520
|
+
? `Trashed 1 message (syncing) — Ctrl+Z to undo`
|
|
1521
|
+
: `Trashed ${snapshot.length} messages (syncing) — Ctrl+Z to undo`;
|
|
1516
1522
|
// Fire-and-forget per local-first: optimistic remove above already
|
|
1517
1523
|
// updated the UI; the daemon-side trash is sync DB + queued IMAP.
|
|
1518
1524
|
// An IPC 120s timeout doesn't mean the trash failed — surfacing it
|
|
@@ -1544,10 +1550,17 @@ async function performUndo() {
|
|
|
1544
1550
|
const statusSync = document.getElementById("status-sync");
|
|
1545
1551
|
try {
|
|
1546
1552
|
if (op.kind === "delete") {
|
|
1547
|
-
|
|
1548
|
-
|
|
1553
|
+
// payload is the full batch (was a single object pre-2026-06-12;
|
|
1554
|
+
// tolerate both shapes so an in-flight undo from an old build
|
|
1555
|
+
// doesn't throw).
|
|
1556
|
+
const msgs = Array.isArray(op.payload) ? op.payload : [op.payload];
|
|
1557
|
+
for (const m of msgs) {
|
|
1558
|
+
await undeleteMessage(m.accountId, m.uid, m.folderId);
|
|
1559
|
+
}
|
|
1549
1560
|
if (statusSync)
|
|
1550
|
-
statusSync.textContent =
|
|
1561
|
+
statusSync.textContent = msgs.length === 1
|
|
1562
|
+
? "Message restored"
|
|
1563
|
+
: `Restored ${msgs.length} messages`;
|
|
1551
1564
|
}
|
|
1552
1565
|
else if (op.kind === "move") {
|
|
1553
1566
|
const { messages } = op.payload;
|