@bobfrankston/rmfmail 1.0.696 → 1.0.698
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 +31 -10
- package/client/app.bundle.js.map +2 -2
- package/client/components/alarms.js +12 -10
- package/client/components/alarms.js.map +1 -1
- package/client/components/alarms.ts +11 -10
- package/client/components/message-list.js +11 -1
- package/client/components/message-list.js.map +1 -1
- package/client/components/message-list.ts +11 -1
- package/client/components/message-viewer.js +53 -14
- package/client/components/message-viewer.js.map +1 -1
- package/client/components/message-viewer.ts +50 -14
- package/package.json +3 -3
- package/packages/mailx-imap/index.d.ts.map +1 -1
- package/packages/mailx-imap/index.js +6 -2
- package/packages/mailx-imap/index.js.map +1 -1
- package/packages/mailx-imap/index.ts +6 -2
- package/packages/mailx-imap/package-lock.json +2 -2
- package/packages/mailx-imap/package.json +1 -1
- package/packages/mailx-store/package.json +1 -1
- package/packages/mailx-store/parse-serial.d.ts +4 -3
- package/packages/mailx-store/parse-serial.d.ts.map +1 -1
- package/packages/mailx-store/parse-serial.js +37 -7
- package/packages/mailx-store/parse-serial.js.map +1 -1
- package/packages/mailx-store/parse-serial.ts +48 -7
- package/packages/mailx-imap/node_modules.npmglobalize-stash-34224/.package-lock.json +0 -116
package/client/app.bundle.js
CHANGED
|
@@ -998,10 +998,11 @@ async function showMessage(accountId, uid, folderId, specialUse, isRetry = false
|
|
|
998
998
|
} catch {
|
|
999
999
|
}
|
|
1000
1000
|
if (!cachedMsg) {
|
|
1001
|
-
|
|
1001
|
+
const previewText = (cached.preview || "").trim();
|
|
1002
|
+
bodyEl.innerHTML = previewText ? `<div class="mv-preview-placeholder">${escapeHtml(previewText)}</div>` : `<div class="mv-empty">Loading body\u2026</div>`;
|
|
1002
1003
|
}
|
|
1003
1004
|
} else if (!cachedMsg) {
|
|
1004
|
-
bodyEl.innerHTML = ""
|
|
1005
|
+
bodyEl.innerHTML = `<div class="mv-empty">Loading body\u2026</div>`;
|
|
1005
1006
|
headerEl.hidden = true;
|
|
1006
1007
|
}
|
|
1007
1008
|
attEl.hidden = true;
|
|
@@ -1024,7 +1025,8 @@ async function showMessage(accountId, uid, folderId, specialUse, isRetry = false
|
|
|
1024
1025
|
headerEl.hidden = false;
|
|
1025
1026
|
} catch {
|
|
1026
1027
|
}
|
|
1027
|
-
|
|
1028
|
+
const previewText = (msg.preview || cached?.preview || "").trim();
|
|
1029
|
+
bodyEl.innerHTML = previewText ? `<div class="mv-preview-placeholder">${escapeHtml(previewText)}</div>` : `<div class="mv-empty">Fetching body from server\u2026</div>`;
|
|
1028
1030
|
const captureGen = gen;
|
|
1029
1031
|
const off = onEvent((ev) => {
|
|
1030
1032
|
if (!ev || ev.type !== "bodyAvailable")
|
|
@@ -1196,15 +1198,28 @@ async function showMessage(accountId, uid, folderId, specialUse, isRetry = false
|
|
|
1196
1198
|
const m = mailUrl.match(/^mailto:([^?]*)(?:\?(.*))?$/i);
|
|
1197
1199
|
const to = m?.[1] ? decodeURIComponent(m[1]) : "";
|
|
1198
1200
|
const qs = new URLSearchParams(m?.[2] || "");
|
|
1199
|
-
const
|
|
1200
|
-
const
|
|
1201
|
+
const origFrom = msg.from ? msg.from.name ? `${msg.from.name} <${msg.from.address}>` : msg.from.address : "";
|
|
1202
|
+
const origSubject = msg.subject || "";
|
|
1203
|
+
const origDate = msg.date ? new Date(msg.date).toLocaleString(void 0, { year: "numeric", month: "short", day: "numeric", hour: "2-digit", minute: "2-digit", hour12: false }) : "";
|
|
1204
|
+
const subject = qs.get("subject") || (origSubject ? `Unsubscribe: ${origSubject}` : "Unsubscribe");
|
|
1205
|
+
const inlineBody = qs.get("body") || "";
|
|
1206
|
+
const escape = (s) => s.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
1207
|
+
const contextLines = [];
|
|
1208
|
+
if (origFrom)
|
|
1209
|
+
contextLines.push(`From: ${escape(origFrom)}`);
|
|
1210
|
+
if (origSubject)
|
|
1211
|
+
contextLines.push(`Subject: ${escape(origSubject)}`);
|
|
1212
|
+
if (origDate)
|
|
1213
|
+
contextLines.push(`Date: ${escape(origDate)}`);
|
|
1214
|
+
const contextBlock = contextLines.length ? `<p>\u2014<br>${contextLines.join("<br>")}</p>` : "";
|
|
1215
|
+
const bodyHtml = inlineBody ? `<p>${escape(inlineBody)}</p>${contextBlock}` : `<p>Please unsubscribe me from this list.</p>${contextBlock}`;
|
|
1201
1216
|
const init = {
|
|
1202
1217
|
mode: "new",
|
|
1203
1218
|
accountId: currentAccountId,
|
|
1204
1219
|
to: to ? [{ name: "", address: to }] : [],
|
|
1205
1220
|
cc: [],
|
|
1206
1221
|
subject,
|
|
1207
|
-
bodyHtml
|
|
1222
|
+
bodyHtml,
|
|
1208
1223
|
inReplyTo: "",
|
|
1209
1224
|
references: [],
|
|
1210
1225
|
accounts: []
|
|
@@ -3157,8 +3172,13 @@ var init_message_list = __esm({
|
|
|
3157
3172
|
}
|
|
3158
3173
|
const body = this.el.parentElement;
|
|
3159
3174
|
if (body?.classList.contains("multi-select-on")) {
|
|
3160
|
-
|
|
3175
|
+
const willBeSelected = !this.isSelected;
|
|
3176
|
+
this.setSelected(willBeSelected);
|
|
3161
3177
|
lastClickedRow = this.el;
|
|
3178
|
+
if (willBeSelected) {
|
|
3179
|
+
focusRow(this);
|
|
3180
|
+
this.setUnreadClass(false);
|
|
3181
|
+
}
|
|
3162
3182
|
updateBulkBar();
|
|
3163
3183
|
return;
|
|
3164
3184
|
}
|
|
@@ -4423,7 +4443,9 @@ async function collectDueAlarms(now) {
|
|
|
4423
4443
|
const startMs = ev.startMs || 0;
|
|
4424
4444
|
if (!startMs)
|
|
4425
4445
|
continue;
|
|
4426
|
-
|
|
4446
|
+
if (!Array.isArray(ev.reminderMinutes) || ev.reminderMinutes.length === 0)
|
|
4447
|
+
continue;
|
|
4448
|
+
const offsets = ev.reminderMinutes.map((m) => m * 6e4);
|
|
4427
4449
|
for (const offsetMs of offsets) {
|
|
4428
4450
|
const occBaseKey = occKey(ev.uuid, startMs);
|
|
4429
4451
|
const key = `${occBaseKey}@${offsetMs}`;
|
|
@@ -4738,14 +4760,13 @@ function startAlarmPoller() {
|
|
|
4738
4760
|
});
|
|
4739
4761
|
});
|
|
4740
4762
|
}
|
|
4741
|
-
var DISMISSED_KEY, SNOOZED_KEY,
|
|
4763
|
+
var DISMISSED_KEY, SNOOZED_KEY, LOOKBACK_MS, LOOKAHEAD_MS, POLL_INTERVAL_MS, firedThisSession, openPopups;
|
|
4742
4764
|
var init_alarms = __esm({
|
|
4743
4765
|
"client/components/alarms.js"() {
|
|
4744
4766
|
"use strict";
|
|
4745
4767
|
init_api_client();
|
|
4746
4768
|
DISMISSED_KEY = "mailx-alarm-dismissed";
|
|
4747
4769
|
SNOOZED_KEY = "mailx-alarm-snoozed";
|
|
4748
|
-
CAL_LEAD_MS = 10 * 60 * 1e3;
|
|
4749
4770
|
LOOKBACK_MS = 60 * 60 * 1e3;
|
|
4750
4771
|
LOOKAHEAD_MS = 2 * 60 * 60 * 1e3;
|
|
4751
4772
|
POLL_INTERVAL_MS = 3e4;
|