@bobfrankston/rmfmail 1.0.686 → 1.0.690
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 +57 -19
- package/client/app.bundle.js.map +2 -2
- package/client/app.js +36 -2
- package/client/app.js.map +1 -1
- package/client/app.ts +36 -2
- package/client/components/alarms.js +24 -12
- package/client/components/alarms.js.map +1 -1
- package/client/components/alarms.ts +23 -11
- package/client/components/message-list.js +9 -4
- package/client/components/message-list.js.map +1 -1
- package/client/components/message-list.ts +9 -4
- package/client/components/message-viewer.js +33 -3
- package/client/components/message-viewer.js.map +1 -1
- package/client/components/message-viewer.ts +33 -3
- package/client/compose/compose.bundle.js +7 -0
- package/client/compose/compose.bundle.js.map +2 -2
- package/client/compose/spellcheck.js +19 -0
- package/client/compose/spellcheck.js.map +1 -1
- package/client/compose/spellcheck.ts +17 -0
- package/package.json +3 -3
- package/packages/mailx-imap/index.d.ts.map +1 -1
- package/packages/mailx-imap/index.js +66 -9
- package/packages/mailx-imap/index.js.map +1 -1
- package/packages/mailx-imap/index.ts +63 -9
- package/packages/mailx-imap/package-lock.json +2 -2
- package/packages/mailx-imap/package.json +1 -1
- package/packages/mailx-service/google-sync.d.ts +46 -1
- package/packages/mailx-service/google-sync.d.ts.map +1 -1
- package/packages/mailx-service/google-sync.js +50 -1
- package/packages/mailx-service/google-sync.js.map +1 -1
- package/packages/mailx-service/google-sync.ts +91 -1
- package/packages/mailx-service/index.d.ts.map +1 -1
- package/packages/mailx-service/index.js +79 -6
- package/packages/mailx-service/index.js.map +1 -1
- package/packages/mailx-service/index.ts +76 -6
- package/packages/mailx-service/local-store.d.ts.map +1 -1
- package/packages/mailx-service/local-store.js +11 -0
- package/packages/mailx-service/local-store.js.map +1 -1
- package/packages/mailx-service/local-store.ts +9 -0
- package/packages/mailx-store/db.d.ts +7 -0
- package/packages/mailx-store/db.d.ts.map +1 -1
- package/packages/mailx-store/db.js +46 -5
- package/packages/mailx-store/db.js.map +1 -1
- package/packages/mailx-store/db.ts +48 -5
- package/packages/mailx-store/package.json +1 -1
- /package/packages/mailx-imap/{node_modules.npmglobalize-stash-11884 → node_modules.npmglobalize-stash-51400}/.package-lock.json +0 -0
package/client/app.bundle.js
CHANGED
|
@@ -1269,7 +1269,9 @@ async function showMessage(accountId, uid, folderId, specialUse, isRetry = false
|
|
|
1269
1269
|
}
|
|
1270
1270
|
}
|
|
1271
1271
|
const editBtn2 = document.getElementById("mv-edit-draft");
|
|
1272
|
-
const
|
|
1272
|
+
const msgFlags = Array.isArray(msg?.flags) ? msg.flags : [];
|
|
1273
|
+
const flagged = msgFlags.includes("\\Draft");
|
|
1274
|
+
const isDraft = flagged || specialUse === "drafts" || specialUse === "outbox";
|
|
1273
1275
|
const openDraftInCompose = (cm) => {
|
|
1274
1276
|
const init = {
|
|
1275
1277
|
mode: "draft",
|
|
@@ -1465,7 +1467,7 @@ async function showMessage(accountId, uid, folderId, specialUse, isRetry = false
|
|
|
1465
1467
|
installPreviewControls(iframe);
|
|
1466
1468
|
} else if (msg.bodyText) {
|
|
1467
1469
|
const pre = document.createElement("pre");
|
|
1468
|
-
pre.style.cssText = "padding: 1rem; white-space: pre-wrap; word-break: break-word;";
|
|
1470
|
+
pre.style.cssText = "padding: 1rem; white-space: pre-wrap; word-break: break-word; font-family: system-ui, sans-serif; font-size: 17.5px; line-height: 1.5; color: #1a1a2e; background: #fff; margin: 0;";
|
|
1469
1471
|
pre.innerHTML = linkifyText(msg.bodyText);
|
|
1470
1472
|
bodyEl.appendChild(pre);
|
|
1471
1473
|
} else {
|
|
@@ -1892,6 +1894,18 @@ function popOutCurrentMessage() {
|
|
|
1892
1894
|
document.body.classList.toggle("viewer-fullscreen");
|
|
1893
1895
|
return;
|
|
1894
1896
|
}
|
|
1897
|
+
const flags = Array.isArray(currentMessage.flags) ? currentMessage.flags : [];
|
|
1898
|
+
if (flags.includes("\\Draft")) {
|
|
1899
|
+
document.dispatchEvent(new CustomEvent("mailx-popout-message", {
|
|
1900
|
+
detail: {
|
|
1901
|
+
accountId: currentAccountId,
|
|
1902
|
+
uid: currentMessage.uid,
|
|
1903
|
+
folderId: currentMessage.folderId,
|
|
1904
|
+
subject: currentMessage.subject
|
|
1905
|
+
}
|
|
1906
|
+
}));
|
|
1907
|
+
return;
|
|
1908
|
+
}
|
|
1895
1909
|
spawnDesktopPopout(currentMessage, currentAccountId);
|
|
1896
1910
|
}
|
|
1897
1911
|
function spawnDesktopPopout(msg, accountId) {
|
|
@@ -2264,7 +2278,7 @@ function focusRow(row) {
|
|
|
2264
2278
|
row.setSelected(true);
|
|
2265
2279
|
focusedRow = row;
|
|
2266
2280
|
row.el.scrollIntoView({ block: "nearest" });
|
|
2267
|
-
showMessage(row.accountId, row.msg.uid, row.msg.folderId, void 0, false, row.msg);
|
|
2281
|
+
showMessage(row.accountId, row.msg.uid, row.msg.folderId, currentSpecialUse || void 0, false, row.msg);
|
|
2268
2282
|
onMessageSelect(row.accountId, row.msg.uid, row.msg.folderId);
|
|
2269
2283
|
document.dispatchEvent(new CustomEvent("mailx-focus-changed", { detail: row.msg }));
|
|
2270
2284
|
rememberPosition();
|
|
@@ -2803,7 +2817,7 @@ async function showThreadPopup(pillEl, headMsg) {
|
|
|
2803
2817
|
preview: msg.preview,
|
|
2804
2818
|
hasAttachments: msg.hasAttachments
|
|
2805
2819
|
};
|
|
2806
|
-
showMessage(msg.accountId, msg.uid, msg.folderId, void 0, false, envelope);
|
|
2820
|
+
showMessage(msg.accountId, msg.uid, msg.folderId, currentSpecialUse || void 0, false, envelope);
|
|
2807
2821
|
onMessageSelect(msg.accountId, msg.uid, msg.folderId);
|
|
2808
2822
|
popup.remove();
|
|
2809
2823
|
});
|
|
@@ -4403,20 +4417,24 @@ async function collectDueAlarms(now) {
|
|
|
4403
4417
|
const startMs = ev.startMs || 0;
|
|
4404
4418
|
if (!startMs)
|
|
4405
4419
|
continue;
|
|
4406
|
-
const
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
|
|
4418
|
-
|
|
4419
|
-
|
|
4420
|
+
const offsets = Array.isArray(ev.reminderMinutes) && ev.reminderMinutes.length > 0 ? ev.reminderMinutes.map((m) => m * 6e4) : [CAL_LEAD_MS];
|
|
4421
|
+
for (const offsetMs of offsets) {
|
|
4422
|
+
const occBaseKey = occKey(ev.uuid, startMs);
|
|
4423
|
+
const key = `${occBaseKey}@${offsetMs}`;
|
|
4424
|
+
if (dismissed[key])
|
|
4425
|
+
continue;
|
|
4426
|
+
const alarm = startMs - offsetMs;
|
|
4427
|
+
const effective = snoozed[key] || alarm;
|
|
4428
|
+
if (effective <= now && effective > now - LOOKBACK_MS) {
|
|
4429
|
+
items.push({
|
|
4430
|
+
uuid: key,
|
|
4431
|
+
kind: "calendar",
|
|
4432
|
+
title: ev.title || "(no title)",
|
|
4433
|
+
alarmMs: effective,
|
|
4434
|
+
whenMs: startMs,
|
|
4435
|
+
htmlLink: ev.htmlLink
|
|
4436
|
+
});
|
|
4437
|
+
}
|
|
4420
4438
|
}
|
|
4421
4439
|
}
|
|
4422
4440
|
} catch {
|
|
@@ -9130,6 +9148,26 @@ document.addEventListener("mailx-popout-message", (async (e) => {
|
|
|
9130
9148
|
alert(`Couldn't load message: ${err?.message || err}`);
|
|
9131
9149
|
return;
|
|
9132
9150
|
}
|
|
9151
|
+
const isDraft = Array.isArray(msg?.flags) && msg.flags.includes("\\Draft");
|
|
9152
|
+
if (isDraft) {
|
|
9153
|
+
const accts = await getAccounts();
|
|
9154
|
+
const init = {
|
|
9155
|
+
mode: "draft",
|
|
9156
|
+
accountId,
|
|
9157
|
+
to: msg.to || [],
|
|
9158
|
+
cc: msg.cc || [],
|
|
9159
|
+
subject: msg.subject || subject || "",
|
|
9160
|
+
bodyHtml: msg.bodyHtml || "",
|
|
9161
|
+
inReplyTo: msg.inReplyTo || "",
|
|
9162
|
+
references: msg.references || [],
|
|
9163
|
+
accounts: accts.map((a) => ({ id: a.id, name: a.name, email: a.email, signature: a.signature, sig: a.sig })),
|
|
9164
|
+
draftUid: msg.uid,
|
|
9165
|
+
draftFolderId: msg.folderId
|
|
9166
|
+
};
|
|
9167
|
+
sessionStorage.setItem("composeInit", JSON.stringify(init));
|
|
9168
|
+
showComposeOverlay(msg.subject ? `Edit: ${msg.subject}` : "Edit draft");
|
|
9169
|
+
return;
|
|
9170
|
+
}
|
|
9133
9171
|
const wrapper = document.createElement("div");
|
|
9134
9172
|
wrapper.className = "popout-overlay";
|
|
9135
9173
|
wrapper.style.cssText = "position:fixed;top:5vh;right:5vw;width:min(900px,60vw);height:min(800px,80vh);z-index:1500;background:var(--color-bg);border:1px solid var(--color-border);border-radius:6px;box-shadow:0 8px 32px rgba(0,0,0,0.3);display:flex;flex-direction:column;resize:both;overflow:hidden;";
|
|
@@ -9157,7 +9195,7 @@ document.addEventListener("mailx-popout-message", (async (e) => {
|
|
|
9157
9195
|
wrapper.appendChild(meta);
|
|
9158
9196
|
wrapper.appendChild(body);
|
|
9159
9197
|
document.body.appendChild(wrapper);
|
|
9160
|
-
body.srcdoc = msg.bodyHtml
|
|
9198
|
+
body.srcdoc = msg.bodyHtml ? wrapHtmlBody(msg.bodyHtml, !!msg.remoteAllowed) : `<!DOCTYPE html><html><head><style>body{font-family:system-ui,sans-serif;font-size:17.5px;line-height:1.5;color:#1a1a2e;padding:1rem;margin:0;}pre{white-space:pre-wrap;word-break:break-word;font-family:inherit;font-size:inherit;margin:0;}</style></head><body><pre>${escapeHtmlBasic(msg.bodyText || "(no body)")}</pre></body></html>`;
|
|
9161
9199
|
let dragX = 0, dragY = 0, dragging = false;
|
|
9162
9200
|
header.addEventListener("mousedown", (de) => {
|
|
9163
9201
|
if (de.target.tagName === "BUTTON") return;
|