@bobfrankston/rmfmail 1.1.105 → 1.1.107
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 +54 -19
- package/client/app.bundle.js.map +2 -2
- package/client/app.js +96 -37
- package/client/app.js.map +1 -1
- package/client/app.ts +86 -35
- package/client/compose/compose.bundle.js +25 -9
- package/client/compose/compose.bundle.js.map +2 -2
- package/client/lib/rmf-tiny.js +40 -11
- package/client/styles/components.css +18 -0
- package/package.json +1 -1
- package/packages/mailx-store/charset.d.ts.map +1 -1
- package/packages/mailx-store/charset.js +20 -0
- package/packages/mailx-store/charset.js.map +1 -1
- package/packages/mailx-store/charset.ts +19 -0
- /package/packages/mailx-imap/{node_modules.npmglobalize-stash-18636 → node_modules.npmglobalize-stash-61168}/.package-lock.json +0 -0
package/client/app.bundle.js
CHANGED
|
@@ -7418,14 +7418,14 @@ function quoteBody(msg) {
|
|
|
7418
7418
|
const date = new Date(msg.date).toLocaleString();
|
|
7419
7419
|
const from = msg.from.name ? `${msg.from.name} <${msg.from.address}>` : msg.from.address;
|
|
7420
7420
|
const body = sanitizeQuotedBody(msg);
|
|
7421
|
-
return `<
|
|
7421
|
+
return `<p><br></p><div class="reply"><p>On ${date}, ${from} wrote:</p><blockquote>${body}</blockquote></div>`;
|
|
7422
7422
|
}
|
|
7423
7423
|
function forwardBody(msg) {
|
|
7424
7424
|
const date = new Date(msg.date).toLocaleString();
|
|
7425
7425
|
const from = msg.from.name ? `${msg.from.name} <${msg.from.address}>` : msg.from.address;
|
|
7426
7426
|
const to = msg.to.map((a) => a.name ? `${a.name} <${a.address}>` : a.address).join(", ");
|
|
7427
7427
|
const body = sanitizeQuotedBody(msg);
|
|
7428
|
-
return `<
|
|
7428
|
+
return `<p><br></p><div class="reply"><p>---------- Forwarded message ----------<br>From: ${from}<br>Date: ${date}<br>Subject: ${msg.subject}<br>To: ${to}</p>${body}</div>`;
|
|
7429
7429
|
}
|
|
7430
7430
|
var lastDeleted = null;
|
|
7431
7431
|
var lastMoved = null;
|
|
@@ -7944,6 +7944,8 @@ searchInput?.addEventListener("scroll", () => {
|
|
|
7944
7944
|
});
|
|
7945
7945
|
searchInput?.addEventListener("change", () => updateSearchHighlight());
|
|
7946
7946
|
updateSearchHighlight();
|
|
7947
|
+
var SERVER_SEARCH_DALLY_MS = 700;
|
|
7948
|
+
var serverSearchTimer = null;
|
|
7947
7949
|
function doSearch(immediate = false) {
|
|
7948
7950
|
const query = searchInput.value.trim();
|
|
7949
7951
|
if (query.length === 0) {
|
|
@@ -7954,9 +7956,13 @@ function doSearch(immediate = false) {
|
|
|
7954
7956
|
const serverCheck = document.getElementById("search-server-too");
|
|
7955
7957
|
const trashCheck = document.getElementById("search-include-trash");
|
|
7956
7958
|
const localScope = searchScope?.value || "all";
|
|
7957
|
-
const effectiveScope = serverCheck?.checked ? "server" : localScope;
|
|
7958
7959
|
const includeTrash = !!trashCheck?.checked;
|
|
7959
|
-
|
|
7960
|
+
const serverOn = !!serverCheck?.checked;
|
|
7961
|
+
if (serverSearchTimer) {
|
|
7962
|
+
clearTimeout(serverSearchTimer);
|
|
7963
|
+
serverSearchTimer = null;
|
|
7964
|
+
}
|
|
7965
|
+
if (localScope === "current" && !serverOn && !immediate) {
|
|
7960
7966
|
const body = document.getElementById("ml-body");
|
|
7961
7967
|
if (body) {
|
|
7962
7968
|
const lower = query.toLowerCase();
|
|
@@ -7967,19 +7973,30 @@ function doSearch(immediate = false) {
|
|
|
7967
7973
|
}
|
|
7968
7974
|
return;
|
|
7969
7975
|
}
|
|
7970
|
-
|
|
7976
|
+
const localScopeEff = localScope === "current" ? "current" : "all";
|
|
7977
|
+
loadSearchResults(query, localScopeEff, currentAccountId3, currentFolderId2, includeTrash);
|
|
7971
7978
|
setTitle(`${APP_NAME} - Search: ${query}`);
|
|
7972
7979
|
setActiveView(
|
|
7973
|
-
{ kind: "search", query, scope:
|
|
7980
|
+
{ kind: "search", query, scope: serverOn ? "server" : localScopeEff, accountId: currentAccountId3, folderId: currentFolderId2, includeTrash },
|
|
7974
7981
|
`Search: ${query}`
|
|
7975
7982
|
);
|
|
7976
7983
|
recordSearchHistory(query);
|
|
7984
|
+
if (serverOn) {
|
|
7985
|
+
serverSearchTimer = setTimeout(() => {
|
|
7986
|
+
serverSearchTimer = null;
|
|
7987
|
+
loadSearchResults(query, "server", currentAccountId3, currentFolderId2, includeTrash);
|
|
7988
|
+
}, SERVER_SEARCH_DALLY_MS);
|
|
7989
|
+
}
|
|
7977
7990
|
}
|
|
7978
7991
|
var currentAccountId3 = "";
|
|
7979
7992
|
var currentFolderId2 = 0;
|
|
7980
7993
|
var reloadDebounceTimer = null;
|
|
7981
7994
|
searchInput?.addEventListener("input", () => {
|
|
7982
7995
|
clearTimeout(searchTimeout);
|
|
7996
|
+
if (serverSearchTimer) {
|
|
7997
|
+
clearTimeout(serverSearchTimer);
|
|
7998
|
+
serverSearchTimer = null;
|
|
7999
|
+
}
|
|
7983
8000
|
updateSearchHighlight();
|
|
7984
8001
|
if (searchInput.value.trim() === "") {
|
|
7985
8002
|
clearSearchMode();
|
|
@@ -7988,7 +8005,7 @@ searchInput?.addEventListener("input", () => {
|
|
|
7988
8005
|
reloadCurrentFolder();
|
|
7989
8006
|
setTitle(APP_NAME);
|
|
7990
8007
|
} else {
|
|
7991
|
-
searchTimeout = setTimeout(() => doSearch(false),
|
|
8008
|
+
searchTimeout = setTimeout(() => doSearch(false), 180);
|
|
7992
8009
|
}
|
|
7993
8010
|
});
|
|
7994
8011
|
searchInput?.addEventListener("keydown", (e) => {
|
|
@@ -7998,6 +8015,10 @@ searchInput?.addEventListener("keydown", (e) => {
|
|
|
7998
8015
|
}
|
|
7999
8016
|
if (e.key === "Escape") {
|
|
8000
8017
|
searchInput.value = "";
|
|
8018
|
+
if (serverSearchTimer) {
|
|
8019
|
+
clearTimeout(serverSearchTimer);
|
|
8020
|
+
serverSearchTimer = null;
|
|
8021
|
+
}
|
|
8001
8022
|
updateSearchHighlight();
|
|
8002
8023
|
clearSearchMode();
|
|
8003
8024
|
const body = document.getElementById("ml-body");
|
|
@@ -9861,18 +9882,32 @@ optEditorTiptap?.addEventListener("change", () => {
|
|
|
9861
9882
|
if (optEditorTiptap.checked) saveEditorSetting("tiptap");
|
|
9862
9883
|
});
|
|
9863
9884
|
optEditorTinymce?.addEventListener("change", () => {
|
|
9864
|
-
if (optEditorTinymce.checked)
|
|
9865
|
-
|
|
9866
|
-
|
|
9867
|
-
|
|
9868
|
-
|
|
9869
|
-
|
|
9870
|
-
|
|
9871
|
-
|
|
9872
|
-
|
|
9873
|
-
|
|
9874
|
-
|
|
9875
|
-
|
|
9885
|
+
if (!optEditorTinymce.checked) return;
|
|
9886
|
+
saveEditorSetting("tinymce");
|
|
9887
|
+
const cdnUrl = localStorage.getItem("mailx-tinymce-cdn") || "lib/tinymce/tinymce.min.js";
|
|
9888
|
+
const label = optEditorTinymce.closest("label");
|
|
9889
|
+
let status = document.getElementById("opt-editor-tinymce-status");
|
|
9890
|
+
if (label && !status) {
|
|
9891
|
+
status = document.createElement("span");
|
|
9892
|
+
status.id = "opt-editor-tinymce-status";
|
|
9893
|
+
status.className = "tb-menu-status";
|
|
9894
|
+
label.appendChild(status);
|
|
9895
|
+
}
|
|
9896
|
+
const setStatus = (text, state) => {
|
|
9897
|
+
if (!status) return;
|
|
9898
|
+
status.textContent = text;
|
|
9899
|
+
status.dataset.state = state;
|
|
9900
|
+
};
|
|
9901
|
+
setStatus(" loading\u2026", "pending");
|
|
9902
|
+
fetch(cdnUrl, { cache: "force-cache" }).then((r) => r.ok ? r.arrayBuffer() : Promise.reject(new Error(`HTTP ${r.status}`))).then(() => {
|
|
9903
|
+
setStatus(" \u2713 ready", "ready");
|
|
9904
|
+
setTimeout(() => {
|
|
9905
|
+
if (status?.dataset.state === "ready") setStatus("", "idle");
|
|
9906
|
+
}, 4e3);
|
|
9907
|
+
}).catch((e) => {
|
|
9908
|
+
setStatus(" \u26A0 load failed", "error");
|
|
9909
|
+
console.error("[tinymce] pre-warm fetch failed:", e?.message || e);
|
|
9910
|
+
});
|
|
9876
9911
|
});
|
|
9877
9912
|
var optExtEditAuto = document.getElementById("opt-extedit-auto");
|
|
9878
9913
|
var optExtEditWord = document.getElementById("opt-extedit-word");
|