@bobfrankston/rmfmail 1.0.693 → 1.0.695
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 +25 -23
- package/client/app.bundle.js.map +2 -2
- package/client/app.js +24 -21
- package/client/app.js.map +1 -1
- package/client/app.ts +23 -19
- package/client/components/message-list.js +17 -7
- package/client/components/message-list.js.map +1 -1
- package/client/components/message-list.ts +14 -6
- package/package.json +1 -1
- package/packages/mailx-service/local-store.d.ts.map +1 -1
- package/packages/mailx-service/local-store.js +17 -1
- package/packages/mailx-service/local-store.js.map +1 -1
- package/packages/mailx-service/local-store.ts +19 -2
- /package/packages/mailx-imap/{node_modules.npmglobalize-stash-16972 → node_modules.npmglobalize-stash-36352}/.package-lock.json +0 -0
package/client/app.bundle.js
CHANGED
|
@@ -3314,12 +3314,18 @@ var init_message_list = __esm({
|
|
|
3314
3314
|
const pick = await pickFolder(accountId, { excludeFolderIds: [msg.folderId] });
|
|
3315
3315
|
if (!pick)
|
|
3316
3316
|
return;
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3317
|
+
removeMessagesAndReconcile(uids.map((u) => ({ accountId, uid: u })));
|
|
3318
|
+
const statusSync = document.getElementById("status-sync");
|
|
3319
|
+
if (statusSync)
|
|
3320
|
+
statusSync.textContent = `Moving ${uids.length} message${uids.length !== 1 ? "s" : ""} to ${pick.folderName}\u2026`;
|
|
3321
|
+
moveMessages(accountId, uids, pick.folderId).then(() => {
|
|
3322
|
+
if (statusSync)
|
|
3323
|
+
statusSync.textContent = `Moved ${uids.length} to ${pick.folderName}`;
|
|
3324
|
+
}).catch((err) => {
|
|
3325
|
+
console.error(`Move failed: ${err?.message || err}`);
|
|
3326
|
+
if (statusSync)
|
|
3327
|
+
statusSync.textContent = `Move sync issue: ${err?.message || err}`;
|
|
3328
|
+
});
|
|
3323
3329
|
}
|
|
3324
3330
|
},
|
|
3325
3331
|
{ label: "Delete", action: () => document.dispatchEvent(new CustomEvent("mailx-delete")) },
|
|
@@ -6709,24 +6715,20 @@ async function spamSelectedMessages() {
|
|
|
6709
6715
|
const statusSync = document.getElementById("status-sync");
|
|
6710
6716
|
const snapshot = [...selected];
|
|
6711
6717
|
removeMessagesAndReconcile(selected);
|
|
6712
|
-
|
|
6713
|
-
|
|
6714
|
-
|
|
6715
|
-
|
|
6716
|
-
|
|
6717
|
-
|
|
6718
|
-
|
|
6719
|
-
|
|
6720
|
-
|
|
6718
|
+
const byAccount = /* @__PURE__ */ new Map();
|
|
6719
|
+
for (const msg of snapshot) {
|
|
6720
|
+
const uids = byAccount.get(msg.accountId) || [];
|
|
6721
|
+
uids.push(msg.uid);
|
|
6722
|
+
byAccount.set(msg.accountId, uids);
|
|
6723
|
+
}
|
|
6724
|
+
if (statusSync) statusSync.textContent = `Spam: ${snapshot.length} queued \u2014 pending server sync`;
|
|
6725
|
+
for (const [accountId, uids] of byAccount) {
|
|
6726
|
+
markAsSpamMessages(accountId, uids).then((result) => {
|
|
6721
6727
|
console.log(`[spam] ${accountId}: moved ${result?.moved ?? uids.length} to folderId=${result?.targetFolderId}`);
|
|
6722
|
-
}
|
|
6723
|
-
|
|
6724
|
-
|
|
6725
|
-
|
|
6726
|
-
if (statusSync) statusSync.textContent = `Spam failed: ${e?.message || e}`;
|
|
6727
|
-
alert(`Mark-as-spam failed: ${e?.message || e}
|
|
6728
|
-
|
|
6729
|
-
${selected.length} message(s) stayed in the list; check Settings \u2192 account spam folder and accounts.jsonc.`);
|
|
6728
|
+
}).catch((e) => {
|
|
6729
|
+
console.error(`[spam] ${accountId} failed:`, e);
|
|
6730
|
+
if (statusSync) statusSync.textContent = `Spam sync issue (${accountId}): ${e?.message || e}`;
|
|
6731
|
+
});
|
|
6730
6732
|
}
|
|
6731
6733
|
}
|
|
6732
6734
|
document.getElementById("btn-spam")?.addEventListener("click", spamSelectedMessages);
|