@bobfrankston/rmfmail 1.1.228 → 1.1.230
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 +29 -11
- package/client/app.bundle.js.map +2 -2
- package/client/app.js +42 -7
- package/client/app.js.map +1 -1
- package/client/app.ts +43 -7
- package/client/compose/compose.bundle.js +5 -5
- package/client/compose/compose.bundle.js.map +2 -2
- package/client/lib/api-client.js +5 -5
- package/client/lib/api-client.js.map +1 -1
- package/client/lib/api-client.ts +5 -5
- package/client/lib/mailxapi.js +4 -4
- package/package.json +1 -1
- package/packages/mailx-service/index.d.ts +2 -2
- package/packages/mailx-service/index.d.ts.map +1 -1
- package/packages/mailx-service/index.js +56 -24
- package/packages/mailx-service/index.js.map +1 -1
- package/packages/mailx-service/index.ts +52 -18
- package/packages/mailx-service/jsonrpc.js +2 -2
- package/packages/mailx-service/jsonrpc.js.map +1 -1
- package/packages/mailx-service/jsonrpc.ts +2 -2
- /package/packages/mailx-imap/{node_modules.npmglobalize-stash-126048 → node_modules.npmglobalize-stash-86824}/.package-lock.json +0 -0
package/client/app.bundle.js
CHANGED
|
@@ -329,13 +329,13 @@ function removeUserDictWord(word) {
|
|
|
329
329
|
function flagSenderOrDomain(type, value) {
|
|
330
330
|
return ipc().flagSenderOrDomain?.(type, value) ?? Promise.resolve({ flagged: false });
|
|
331
331
|
}
|
|
332
|
-
function deleteMessage(accountId, uid) {
|
|
333
|
-
return ipc().deleteMessage?.(accountId, uid);
|
|
332
|
+
function deleteMessage(accountId, uid, folderId) {
|
|
333
|
+
return ipc().deleteMessage?.(accountId, uid, folderId);
|
|
334
334
|
}
|
|
335
|
-
function deleteMessages(accountId, uids) {
|
|
335
|
+
function deleteMessages(accountId, uids, folderIds) {
|
|
336
336
|
if (uids.length === 1)
|
|
337
|
-
return deleteMessage(accountId, uids[0]);
|
|
338
|
-
return ipc().deleteMessages?.(accountId, uids);
|
|
337
|
+
return deleteMessage(accountId, uids[0], folderIds?.[0]);
|
|
338
|
+
return ipc().deleteMessages?.(accountId, uids, folderIds);
|
|
339
339
|
}
|
|
340
340
|
function moveMessages(accountId, uids, targetFolderId, targetAccountId) {
|
|
341
341
|
if (uids.length === 1)
|
|
@@ -7407,6 +7407,18 @@ function refreshSyncTooltip() {
|
|
|
7407
7407
|
}).join("\n");
|
|
7408
7408
|
}
|
|
7409
7409
|
setInterval(refreshSyncTooltip, 3e4);
|
|
7410
|
+
var syncSettleTimer = null;
|
|
7411
|
+
var SYNC_SETTLE_MS = 4e3;
|
|
7412
|
+
function scheduleSyncedStamp() {
|
|
7413
|
+
if (syncSettleTimer) clearTimeout(syncSettleTimer);
|
|
7414
|
+
syncSettleTimer = setTimeout(() => {
|
|
7415
|
+
syncSettleTimer = null;
|
|
7416
|
+
const el = document.getElementById("status-sync");
|
|
7417
|
+
if (el && (el.textContent || "").startsWith("Syncing")) {
|
|
7418
|
+
el.textContent = `Synced ${(/* @__PURE__ */ new Date()).toLocaleTimeString(void 0, { hour: "2-digit", minute: "2-digit", hour12: false })}`;
|
|
7419
|
+
}
|
|
7420
|
+
}, SYNC_SETTLE_MS);
|
|
7421
|
+
}
|
|
7410
7422
|
var messageList = document.getElementById("message-list");
|
|
7411
7423
|
if (messageList) {
|
|
7412
7424
|
const twoLineThreshold = 600;
|
|
@@ -7993,12 +8005,13 @@ async function deleteSelectedMessages() {
|
|
|
7993
8005
|
}
|
|
7994
8006
|
const byAccount = /* @__PURE__ */ new Map();
|
|
7995
8007
|
for (const msg of snapshot) {
|
|
7996
|
-
const
|
|
7997
|
-
uids.push(msg.uid);
|
|
7998
|
-
|
|
8008
|
+
const g = byAccount.get(msg.accountId) || { uids: [], folderIds: [] };
|
|
8009
|
+
g.uids.push(msg.uid);
|
|
8010
|
+
g.folderIds.push(msg.folderId);
|
|
8011
|
+
byAccount.set(msg.accountId, g);
|
|
7999
8012
|
}
|
|
8000
|
-
for (const [accountId,
|
|
8001
|
-
deleteMessages(accountId, uids).catch((e) => {
|
|
8013
|
+
for (const [accountId, g] of byAccount) {
|
|
8014
|
+
deleteMessages(accountId, g.uids, g.folderIds).catch((e) => {
|
|
8002
8015
|
console.error(`Delete failed for ${accountId}: ${e?.message || e}`);
|
|
8003
8016
|
if (statusSync) statusSync.textContent = `Delete sync issue (${accountId}): ${e?.message || e}`;
|
|
8004
8017
|
});
|
|
@@ -8934,6 +8947,7 @@ onWsEvent((event) => {
|
|
|
8934
8947
|
}
|
|
8935
8948
|
if (statusSync) statusSync.textContent = `Syncing ${event.accountId}: ${label}`;
|
|
8936
8949
|
if (startupStatus) startupStatus.textContent = `Syncing ${event.accountId}: ${label}`;
|
|
8950
|
+
scheduleSyncedStamp();
|
|
8937
8951
|
const syncPath = event.phase?.startsWith("sync:") ? event.phase.slice(5) : null;
|
|
8938
8952
|
document.querySelectorAll(`.ft-folder.ft-syncing[data-account-id="${event.accountId}"]`).forEach((el) => el.classList.remove("ft-syncing"));
|
|
8939
8953
|
if (syncPath && event.progress < 100) {
|
|
@@ -8953,6 +8967,7 @@ onWsEvent((event) => {
|
|
|
8953
8967
|
case "syncComplete":
|
|
8954
8968
|
refreshFolderTree();
|
|
8955
8969
|
recordAccountSync(event.accountId);
|
|
8970
|
+
scheduleSyncedStamp();
|
|
8956
8971
|
break;
|
|
8957
8972
|
case "folderSynced":
|
|
8958
8973
|
for (const entry of event.entries || []) {
|
|
@@ -8977,7 +8992,10 @@ onWsEvent((event) => {
|
|
|
8977
8992
|
syncBtn.disabled = false;
|
|
8978
8993
|
syncBtn.classList.remove("syncing");
|
|
8979
8994
|
}
|
|
8980
|
-
if (statusSync
|
|
8995
|
+
if (statusSync && !(statusSync.textContent || "").startsWith("Sync error")) {
|
|
8996
|
+
statusSync.textContent = "Syncing\u2026";
|
|
8997
|
+
}
|
|
8998
|
+
scheduleSyncedStamp();
|
|
8981
8999
|
break;
|
|
8982
9000
|
}
|
|
8983
9001
|
case "updateAvailable": {
|