@bobfrankston/rmfmail 1.2.251 → 1.2.253
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/bin/mailx.js +20 -0
- package/bin/mailx.js.map +1 -1
- package/bin/mailx.ts +21 -0
- package/client/android-bootstrap.bundle.js +27 -30
- package/client/android-bootstrap.bundle.js.map +2 -2
- package/client/app.bundle.js +33 -1
- package/client/app.bundle.js.map +3 -3
- package/client/app.js +42 -0
- package/client/app.js.map +1 -1
- package/client/app.ts +40 -0
- package/client/components/message-viewer.js +13 -2
- package/client/components/message-viewer.js.map +1 -1
- package/client/components/message-viewer.ts +13 -2
- package/client/compose/compose.bundle.js +37 -3
- package/client/compose/compose.bundle.js.map +3 -3
- package/client/compose/compose.css +13 -0
- package/client/compose/compose.js +41 -1
- package/client/compose/compose.js.map +1 -1
- package/client/compose/compose.ts +38 -1
- package/client/lib/api-client.js +7 -0
- package/client/lib/api-client.js.map +1 -1
- package/client/lib/api-client.ts +8 -0
- package/client/lib/mailxapi.js +10 -2
- package/package.json +3 -3
- package/packages/mailx-imap/package-lock.json +2 -2
- package/packages/mailx-imap/package.json +1 -1
- package/packages/mailx-service/ai-usage.d.ts +32 -0
- package/packages/mailx-service/ai-usage.d.ts.map +1 -0
- package/packages/mailx-service/ai-usage.js +98 -0
- package/packages/mailx-service/ai-usage.js.map +1 -0
- package/packages/mailx-service/ai-usage.ts +110 -0
- package/packages/mailx-service/index.d.ts +25 -1
- package/packages/mailx-service/index.d.ts.map +1 -1
- package/packages/mailx-service/index.js +91 -4
- package/packages/mailx-service/index.js.map +1 -1
- package/packages/mailx-service/index.ts +94 -4
- package/packages/mailx-service/jsonrpc.js +3 -1
- package/packages/mailx-service/jsonrpc.js.map +1 -1
- package/packages/mailx-service/jsonrpc.ts +3 -1
- package/packages/mailx-service/package.json +1 -1
- package/packages/mailx-settings/package.json +1 -1
- package/packages/mailx-store/package.json +1 -1
- package/packages/mailx-store-web/android-bootstrap.js +1 -1
- package/packages/mailx-store-web/android-bootstrap.js.map +1 -1
- package/packages/mailx-store-web/android-bootstrap.ts +1 -1
- package/packages/mailx-store-web/package.json +1 -1
- package/packages/mailx-store-web/web-service.d.ts +5 -1
- package/packages/mailx-store-web/web-service.d.ts.map +1 -1
- package/packages/mailx-store-web/web-service.js +5 -1
- package/packages/mailx-store-web/web-service.js.map +1 -1
- package/packages/mailx-store-web/web-service.ts +5 -1
- package/packages/mailx-types/mailx-api.d.ts +17 -1
- package/packages/mailx-types/mailx-api.d.ts.map +1 -1
- package/packages/mailx-types/mailx-api.ts +10 -1
- package/packages/mailx-types/mime-build.d.ts.map +1 -1
- package/packages/mailx-types/mime-build.js +35 -30
- package/packages/mailx-types/mime-build.js.map +1 -1
- package/packages/mailx-types/mime-build.ts +44 -32
- package/packages/mailx-types/package.json +1 -1
- /package/packages/mailx-imap/{node_modules.npmglobalize-stash-83100 → node_modules.npmglobalize-stash-54924}/.package-lock.json +0 -0
package/client/app.bundle.js
CHANGED
|
@@ -96,6 +96,7 @@ __export(api_client_exports, {
|
|
|
96
96
|
openInTextEditor: () => openInTextEditor,
|
|
97
97
|
openInWord: () => openInWord,
|
|
98
98
|
openLocalPath: () => openLocalPath,
|
|
99
|
+
openPendingAttachment: () => openPendingAttachment,
|
|
99
100
|
popoutCompose: () => popoutCompose,
|
|
100
101
|
popoutMainWindow: () => popoutMainWindow,
|
|
101
102
|
popoutWindow: () => popoutWindow,
|
|
@@ -659,6 +660,10 @@ async function openAttachment(accountId, uid, attachmentId, folderId, filename)
|
|
|
659
660
|
const fn = ipc().openAttachment;
|
|
660
661
|
return fn ? fn(accountId, uid, attachmentId, folderId, filename) : void 0;
|
|
661
662
|
}
|
|
663
|
+
async function openPendingAttachment(filename, mimeType, dataBase64) {
|
|
664
|
+
const fn = ipc().openPendingAttachment;
|
|
665
|
+
return fn ? fn(filename, mimeType, dataBase64) : void 0;
|
|
666
|
+
}
|
|
662
667
|
async function getMessageSource(accountId, uid, folderId) {
|
|
663
668
|
return ipc().getMessageSource(accountId, uid, folderId);
|
|
664
669
|
}
|
|
@@ -2066,7 +2071,10 @@ async function translateAndShow(text) {
|
|
|
2066
2071
|
if (status)
|
|
2067
2072
|
status.textContent = "";
|
|
2068
2073
|
} else {
|
|
2069
|
-
|
|
2074
|
+
const reason = r.reason || "no result";
|
|
2075
|
+
const isDisabled = /disabled in settings|not configured/i.test(reason);
|
|
2076
|
+
const hint = isDisabled ? "Enable AI translate in Settings \u2192 AI features (off by default)." : /can't reach/i.test(reason) ? "The AI provider isn't answering. Check Settings \u2192 AI features, or start the local model server." : "";
|
|
2077
|
+
body.innerHTML = `<div style="color:var(--muted, #888);">No result.</div><div style="margin-top:8px;font-size:12px;color:var(--muted, #888);">${escapeHtml3(reason)}</div>` + (hint ? `<div style="margin-top:14px;font-size:12px;">${hint}</div>` : "");
|
|
2070
2078
|
if (status)
|
|
2071
2079
|
status.textContent = `Translate: ${r.reason || "no result"}`;
|
|
2072
2080
|
}
|
|
@@ -11957,6 +11965,12 @@ function closeToolbarDropdowns() {
|
|
|
11957
11965
|
if (dd && !dd.hidden) hideDropdownHard(dd);
|
|
11958
11966
|
}
|
|
11959
11967
|
}
|
|
11968
|
+
window.addEventListener("message", (e) => {
|
|
11969
|
+
if (e.data?.type !== "iframePointerDown") return;
|
|
11970
|
+
closeToolbarDropdowns();
|
|
11971
|
+
document.getElementById("rail-menu-backdrop")?.remove();
|
|
11972
|
+
refreshToolbarOverlayShield();
|
|
11973
|
+
});
|
|
11960
11974
|
function refreshToolbarOverlayShield() {
|
|
11961
11975
|
const dropdownOpen = ["settings-dropdown", "view-dropdown", "restart-dropdown"].some((id) => {
|
|
11962
11976
|
const el = document.getElementById(id);
|
|
@@ -13440,6 +13454,24 @@ document.addEventListener("mailx-popout-message", (async (e) => {
|
|
|
13440
13454
|
draftFolderId: msg.folderId,
|
|
13441
13455
|
draftId: msg.mailxDraftId || ""
|
|
13442
13456
|
};
|
|
13457
|
+
if (Array.isArray(msg.attachments) && msg.attachments.length) {
|
|
13458
|
+
const loaded = [];
|
|
13459
|
+
for (const att of msg.attachments) {
|
|
13460
|
+
try {
|
|
13461
|
+
const data = await getAttachment(accountId, msg.uid, att.id, msg.folderId);
|
|
13462
|
+
if (data?.content) {
|
|
13463
|
+
loaded.push({
|
|
13464
|
+
filename: data.filename || att.filename || "attachment",
|
|
13465
|
+
mimeType: data.contentType || att.contentType || "application/octet-stream",
|
|
13466
|
+
dataBase64: data.content
|
|
13467
|
+
});
|
|
13468
|
+
}
|
|
13469
|
+
} catch (e2) {
|
|
13470
|
+
console.error(`[compose] edit draft: failed to load attachment ${att.id} ("${att.filename}"): ${e2?.message || e2}`);
|
|
13471
|
+
}
|
|
13472
|
+
}
|
|
13473
|
+
if (loaded.length) init.attachments = loaded;
|
|
13474
|
+
}
|
|
13443
13475
|
sessionStorage.setItem("composeInit", JSON.stringify(init));
|
|
13444
13476
|
showComposeOverlay(msg.subject ? `Edit: ${msg.subject}` : "Edit draft");
|
|
13445
13477
|
return;
|