@bobfrankston/rmfmail 1.2.81 → 1.2.82
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 +18 -26
- package/client/app.bundle.js.map +2 -2
- package/client/app.js +8 -3
- package/client/app.js.map +1 -1
- package/client/app.ts +8 -3
- package/client/components/message-viewer.js +17 -11
- package/client/components/message-viewer.js.map +1 -1
- package/client/components/message-viewer.ts +17 -11
- package/client/index.html +0 -1
- package/package.json +1 -1
package/client/app.bundle.js
CHANGED
|
@@ -2413,22 +2413,6 @@ function popOutCurrentMessage() {
|
|
|
2413
2413
|
}
|
|
2414
2414
|
spawnDesktopPopout(currentMessage, currentAccountId);
|
|
2415
2415
|
}
|
|
2416
|
-
function popOutToWindow() {
|
|
2417
|
-
if (!currentMessage)
|
|
2418
|
-
return;
|
|
2419
|
-
const p = window.__rmfPopout;
|
|
2420
|
-
if (!p?.base || !p?.token) {
|
|
2421
|
-
popOutCurrentMessage();
|
|
2422
|
-
return;
|
|
2423
|
-
}
|
|
2424
|
-
const a = currentAccountId;
|
|
2425
|
-
const u = currentMessage.uid;
|
|
2426
|
-
const f = currentMessage.folderId;
|
|
2427
|
-
const url = `${p.base}/v?a=${encodeURIComponent(a)}&u=${u}&f=${f ?? ""}&t=${encodeURIComponent(p.token)}`;
|
|
2428
|
-
const w = window.open(url, `rmfmsg-${a}-${u}`, "width=820,height=900,resizable=yes,scrollbars=yes");
|
|
2429
|
-
if (!w)
|
|
2430
|
-
popOutCurrentMessage();
|
|
2431
|
-
}
|
|
2432
2416
|
function printCurrentMessage() {
|
|
2433
2417
|
if (!currentMessage)
|
|
2434
2418
|
return;
|
|
@@ -2551,22 +2535,26 @@ function spawnDesktopPopout(msg, accountId) {
|
|
|
2551
2535
|
wrapper.style.right = `${20 + existing * 28}px`;
|
|
2552
2536
|
}
|
|
2553
2537
|
const toolbar = document.createElement("div");
|
|
2554
|
-
toolbar.
|
|
2555
|
-
|
|
2538
|
+
toolbar.className = "mv-toolbar";
|
|
2539
|
+
toolbar.style.cssText = "display:flex;gap:4px;padding:6px 12px;border-bottom:1px solid var(--color-border, #ddd);flex-shrink:0;";
|
|
2540
|
+
const mkPopoutBtn = (glyph, title, onClick) => {
|
|
2556
2541
|
const b = document.createElement("button");
|
|
2557
|
-
b.
|
|
2542
|
+
b.className = "tb-btn";
|
|
2543
|
+
b.textContent = glyph;
|
|
2558
2544
|
b.title = title;
|
|
2559
|
-
b.style.cssText = "padding:4px
|
|
2545
|
+
b.style.cssText = "padding:4px 9px;font-size:15px;cursor:pointer;border:1px solid var(--color-border, #ccc);border-radius:4px;background:var(--color-bg, #fff);color:var(--color-text, #000);";
|
|
2560
2546
|
b.addEventListener("click", onClick);
|
|
2561
2547
|
return b;
|
|
2562
2548
|
};
|
|
2563
2549
|
const firePopoutAction = (action) => {
|
|
2564
2550
|
document.dispatchEvent(new CustomEvent("mailx-popout-action", { detail: { action, msg, accountId } }));
|
|
2565
2551
|
};
|
|
2566
|
-
toolbar.appendChild(mkPopoutBtn("
|
|
2567
|
-
toolbar.appendChild(mkPopoutBtn("
|
|
2568
|
-
toolbar.appendChild(mkPopoutBtn("
|
|
2569
|
-
toolbar.appendChild(mkPopoutBtn("
|
|
2552
|
+
toolbar.appendChild(mkPopoutBtn("\u21A9", "Reply (Ctrl+R)", () => firePopoutAction("reply")));
|
|
2553
|
+
toolbar.appendChild(mkPopoutBtn("\u21A9\u21A9", "Reply All (Ctrl+Shift+R)", () => firePopoutAction("replyAll")));
|
|
2554
|
+
toolbar.appendChild(mkPopoutBtn("\u2192", "Forward", () => firePopoutAction("forward")));
|
|
2555
|
+
toolbar.appendChild(mkPopoutBtn("\u29C9", "Edit as new message", () => firePopoutAction("editAsNew")));
|
|
2556
|
+
toolbar.appendChild(mkPopoutBtn("\u2605", "Flag", () => firePopoutAction("flag")));
|
|
2557
|
+
toolbar.appendChild(mkPopoutBtn("\u{1F5D1}", "Delete", () => {
|
|
2570
2558
|
firePopoutAction("delete");
|
|
2571
2559
|
wrapper.remove();
|
|
2572
2560
|
}));
|
|
@@ -7900,7 +7888,6 @@ var backToList = (e) => {
|
|
|
7900
7888
|
document.getElementById("btn-back")?.addEventListener("click", backToList);
|
|
7901
7889
|
document.getElementById("btn-back")?.addEventListener("touchend", backToList);
|
|
7902
7890
|
document.getElementById("mv-popout")?.addEventListener("click", () => popOutCurrentMessage());
|
|
7903
|
-
document.getElementById("mv-popout-window")?.addEventListener("click", () => popOutToWindow());
|
|
7904
7891
|
document.getElementById("btn-print")?.addEventListener("click", () => printCurrentMessage());
|
|
7905
7892
|
document.getElementById("folder-tree")?.addEventListener("click", (e) => {
|
|
7906
7893
|
if (window.innerWidth <= 768 && e.target.closest(".ft-folder")) {
|
|
@@ -11572,10 +11559,15 @@ ${detail}`;
|
|
|
11572
11559
|
document.addEventListener("mailx-popout-action", ((e) => {
|
|
11573
11560
|
const { action, msg, accountId } = e.detail || {};
|
|
11574
11561
|
if (!msg) return;
|
|
11575
|
-
if (action === "reply" || action === "replyAll" || action === "forward") {
|
|
11562
|
+
if (action === "reply" || action === "replyAll" || action === "forward" || action === "editAsNew") {
|
|
11576
11563
|
openCompose(action, msg, accountId);
|
|
11577
11564
|
} else if (action === "delete") {
|
|
11578
11565
|
deleteMessage(accountId, msg.uid).catch((err) => console.error(`[popout] delete failed: ${err?.message || err}`));
|
|
11566
|
+
} else if (action === "flag") {
|
|
11567
|
+
const wasFlagged = flaggedOf(msg);
|
|
11568
|
+
setFlagged(msg, !wasFlagged);
|
|
11569
|
+
updateFlags(accountId, msg.uid, msg.flags, msg.folderId).catch((err) => console.error(`[popout] flag failed: ${err?.message || err}`));
|
|
11570
|
+
setRowFlagged(accountId, msg.uid, !wasFlagged);
|
|
11579
11571
|
}
|
|
11580
11572
|
}));
|
|
11581
11573
|
document.addEventListener("mailx-popout-message", (async (e) => {
|