@bobfrankston/rmfmail 1.1.199 → 1.1.200
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/TODO.md +4 -2
- package/client/app.bundle.js +11 -2
- package/client/app.bundle.js.map +2 -2
- package/client/app.js +22 -2
- package/client/app.js.map +1 -1
- package/client/app.ts +22 -2
- package/client/components/message-list.js +1 -0
- package/client/components/message-list.js.map +1 -1
- package/client/components/message-list.ts +1 -0
- package/package.json +1 -1
- package/packages/mailx-imap/index.d.ts.map +1 -1
- package/packages/mailx-imap/index.js +8 -0
- package/packages/mailx-imap/index.js.map +1 -1
- package/packages/mailx-imap/index.ts +8 -0
- package/packages/mailx-imap/package-lock.json +2 -2
- package/packages/mailx-imap/package.json +1 -1
- package/packages/mailx-settings/package.json +1 -1
- /package/packages/mailx-imap/{node_modules.npmglobalize-stash-77016 → node_modules.npmglobalize-stash-48876}/.package-lock.json +0 -0
package/client/app.js
CHANGED
|
@@ -860,7 +860,7 @@ async function openCompose(mode, overrideMsg, overrideAccountId) {
|
|
|
860
860
|
// anything missing. Don't show "still loading" alerts — the message IS
|
|
861
861
|
// loaded (it's in the list), body is a separate fetch that isn't needed
|
|
862
862
|
// for Reply's headers. Missing fields become empty strings.
|
|
863
|
-
if ((mode === "reply" || mode === "replyAll" || mode === "forward") && !current) {
|
|
863
|
+
if ((mode === "reply" || mode === "replyAll" || mode === "forward" || mode === "editAsNew") && !current) {
|
|
864
864
|
// Only true blocker: no message selected at all.
|
|
865
865
|
console.warn(`[compose] ${mode} — no message selected`);
|
|
866
866
|
return;
|
|
@@ -881,7 +881,8 @@ async function openCompose(mode, overrideMsg, overrideAccountId) {
|
|
|
881
881
|
const titlePrefix = mode === "reply" ? "Reply" :
|
|
882
882
|
mode === "replyAll" ? "Reply All" :
|
|
883
883
|
mode === "forward" ? "Forward" :
|
|
884
|
-
"
|
|
884
|
+
mode === "editAsNew" ? "Edit as new" :
|
|
885
|
+
"Compose";
|
|
885
886
|
const titleSubject = mode === "new" ? "" : (msg?.subject || "");
|
|
886
887
|
const frame = showComposeOverlay(titleSubject ? `${titlePrefix}: ${titleSubject}` : titlePrefix);
|
|
887
888
|
// Now finish initialisation off the critical path — editor bootstrap
|
|
@@ -1032,6 +1033,18 @@ async function openCompose(mode, overrideMsg, overrideAccountId) {
|
|
|
1032
1033
|
init.bodyHtml = forwardBody(msg);
|
|
1033
1034
|
init.fromAddress = detectReplyFrom();
|
|
1034
1035
|
}
|
|
1036
|
+
else if (msg && mode === "editAsNew") {
|
|
1037
|
+
// Edit-as-new clones an existing message into a fresh compose as if
|
|
1038
|
+
// the user authored it: original To/Cc/Subject/body, all editable.
|
|
1039
|
+
// No `Re:`/`Fwd:` prefix (subject verbatim), no quote/forward wrapper,
|
|
1040
|
+
// no In-Reply-To / References (this is NOT a reply — it gets a brand-
|
|
1041
|
+
// new Message-ID at send time). Replaces the move-to-Drafts kludge for
|
|
1042
|
+
// "tweak this and send it again" (Q152, Bob 2026-05-31).
|
|
1043
|
+
init.to = Array.isArray(msg.to) ? msg.to : [];
|
|
1044
|
+
init.cc = Array.isArray(msg.cc) ? msg.cc : [];
|
|
1045
|
+
init.subject = msg.subject || "";
|
|
1046
|
+
init.bodyHtml = editAsNewBody(msg);
|
|
1047
|
+
}
|
|
1035
1048
|
// Store init data for compose window to pick up. Two parallel paths
|
|
1036
1049
|
// because sessionStorage propagation to a freshly-loading iframe has
|
|
1037
1050
|
// intermittently failed under WebView2's custom-protocol host (Bob
|
|
@@ -1393,6 +1406,13 @@ function quoteBody(msg) {
|
|
|
1393
1406
|
// inside it.
|
|
1394
1407
|
return `<p></p><br><br><div class="reply"><p>On ${date}, ${from} wrote:</p><blockquote>${body}</blockquote></div>`;
|
|
1395
1408
|
}
|
|
1409
|
+
function editAsNewBody(msg) {
|
|
1410
|
+
// The message body verbatim (same plain-text/HTML cleaning a quoted reply
|
|
1411
|
+
// gets), with NO attribution line and NO quote/forward wrapper — the user
|
|
1412
|
+
// is re-authoring this content, not quoting it. A leading empty paragraph
|
|
1413
|
+
// gives the caret a block to land in above the cloned content.
|
|
1414
|
+
return `<p></p>${sanitizeQuotedBody(msg)}`;
|
|
1415
|
+
}
|
|
1396
1416
|
function forwardBody(msg) {
|
|
1397
1417
|
const date = new Date(msg.date).toLocaleString();
|
|
1398
1418
|
const from = msg.from.name ? `${msg.from.name} <${msg.from.address}>` : msg.from.address;
|