@bobfrankston/rmfmail 1.1.78 → 1.1.80
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/.commitmsg +11 -6
- package/client/android-bootstrap.bundle.js +8 -0
- package/client/android-bootstrap.bundle.js.map +2 -2
- package/client/app.bundle.js +35 -17
- package/client/app.bundle.js.map +3 -3
- package/client/components/message-viewer.js +29 -19
- package/client/components/message-viewer.js.map +1 -1
- package/client/components/message-viewer.ts +28 -19
- package/client/compose/compose.bundle.js +23 -5
- package/client/compose/compose.bundle.js.map +2 -2
- package/client/compose/spellcheck.js +23 -9
- package/client/compose/spellcheck.js.map +1 -1
- package/client/compose/spellcheck.ts +20 -8
- package/client/lib/api-client.js +10 -0
- package/client/lib/api-client.js.map +1 -1
- package/client/lib/api-client.ts +11 -0
- package/client/lib/mailxapi.js +9 -0
- package/docs/contacts.md +17 -8
- package/npmchanges.md +27 -0
- package/package.json +3 -3
- package/packages/mailx-service/index.d.ts +12 -0
- package/packages/mailx-service/index.d.ts.map +1 -1
- package/packages/mailx-service/index.js +35 -0
- package/packages/mailx-service/index.js.map +1 -1
- package/packages/mailx-service/index.ts +35 -0
- package/packages/mailx-service/jsonrpc.js +4 -0
- package/packages/mailx-service/jsonrpc.js.map +1 -1
- package/packages/mailx-service/jsonrpc.ts +4 -0
- package/packages/mailx-settings/docs/contacts.md +17 -8
- package/packages/mailx-store-web/package.json +1 -1
- package/packages/mailx-store-web/web-service.d.ts +5 -0
- package/packages/mailx-store-web/web-service.d.ts.map +1 -1
- package/packages/mailx-store-web/web-service.js +4 -0
- package/packages/mailx-store-web/web-service.js.map +1 -1
- package/packages/mailx-store-web/web-service.ts +4 -0
- package/packages/mailx-types/mailx-api.d.ts +5 -0
- package/packages/mailx-types/mailx-api.d.ts.map +1 -1
- package/packages/mailx-types/mailx-api.ts +2 -0
- package/packages/mailx-types/package.json +1 -1
- /package/packages/mailx-imap/{node_modules.npmglobalize-stash-66360 → node_modules.npmglobalize-stash-78668}/.package-lock.json +0 -0
package/client/app.bundle.js
CHANGED
|
@@ -16,6 +16,7 @@ __export(api_client_exports, {
|
|
|
16
16
|
addPreferredContact: () => addPreferredContact,
|
|
17
17
|
addToDenylist: () => addToDenylist,
|
|
18
18
|
addUserDictWord: () => addUserDictWord,
|
|
19
|
+
addUserDictWords: () => addUserDictWords,
|
|
19
20
|
aiTransform: () => aiTransform,
|
|
20
21
|
allowRemoteContent: () => allowRemoteContent,
|
|
21
22
|
autocomplete: () => autocomplete,
|
|
@@ -70,6 +71,7 @@ __export(api_client_exports, {
|
|
|
70
71
|
moveMessages: () => moveMessages,
|
|
71
72
|
onEvent: () => onEvent,
|
|
72
73
|
onWsEvent: () => onWsEvent,
|
|
74
|
+
openAttachment: () => openAttachment,
|
|
73
75
|
openInTextEditor: () => openInTextEditor,
|
|
74
76
|
openInWord: () => openInWord,
|
|
75
77
|
openLocalPath: () => openLocalPath,
|
|
@@ -309,6 +311,9 @@ function getUserDict() {
|
|
|
309
311
|
function addUserDictWord(word) {
|
|
310
312
|
return ipc().addUserDictWord?.(word) ?? Promise.resolve([]);
|
|
311
313
|
}
|
|
314
|
+
function addUserDictWords(words) {
|
|
315
|
+
return ipc().addUserDictWords?.(words) ?? Promise.resolve([]);
|
|
316
|
+
}
|
|
312
317
|
function removeUserDictWord(word) {
|
|
313
318
|
return ipc().removeUserDictWord?.(word) ?? Promise.resolve([]);
|
|
314
319
|
}
|
|
@@ -499,6 +504,10 @@ function setupAccount(name, email, password) {
|
|
|
499
504
|
async function getAttachment(accountId, uid, attachmentId, folderId) {
|
|
500
505
|
return ipc().getAttachment(accountId, uid, attachmentId, folderId);
|
|
501
506
|
}
|
|
507
|
+
async function openAttachment(accountId, uid, attachmentId, folderId) {
|
|
508
|
+
const fn = ipc().openAttachment;
|
|
509
|
+
return fn ? fn(accountId, uid, attachmentId, folderId) : void 0;
|
|
510
|
+
}
|
|
502
511
|
async function getDeviceAccounts() {
|
|
503
512
|
return ipc().getDeviceAccounts?.() ?? [];
|
|
504
513
|
}
|
|
@@ -1657,27 +1666,36 @@ async function showMessage(accountId, uid, folderId, specialUse, isRetry = false
|
|
|
1657
1666
|
chip.addEventListener("click", async (e) => {
|
|
1658
1667
|
e.preventDefault();
|
|
1659
1668
|
try {
|
|
1660
|
-
const data = await getAttachment(accountId, uid, i, msg.folderId);
|
|
1661
1669
|
const bridge = window._nativeBridge;
|
|
1662
1670
|
if (bridge?.openAttachment) {
|
|
1663
|
-
await
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
const blob = new Blob([bytes], { type: data.contentType });
|
|
1667
|
-
const url = URL.createObjectURL(blob);
|
|
1668
|
-
const a = document.createElement("a");
|
|
1669
|
-
a.href = url;
|
|
1670
|
-
a.download = att.filename || "attachment";
|
|
1671
|
-
a.style.display = "none";
|
|
1672
|
-
document.body.appendChild(a);
|
|
1673
|
-
a.click();
|
|
1674
|
-
setTimeout(() => {
|
|
1675
|
-
a.remove();
|
|
1676
|
-
URL.revokeObjectURL(url);
|
|
1677
|
-
}, 5e3);
|
|
1671
|
+
const data2 = await getAttachment(accountId, uid, i, msg.folderId);
|
|
1672
|
+
await bridge.openAttachment(att.filename, data2.contentType, data2.content);
|
|
1673
|
+
return;
|
|
1678
1674
|
}
|
|
1675
|
+
try {
|
|
1676
|
+
const res = await openAttachment(accountId, uid, i, msg.folderId);
|
|
1677
|
+
if (res?.ok)
|
|
1678
|
+
return;
|
|
1679
|
+
} catch (svcErr) {
|
|
1680
|
+
console.warn(`[attachment] service open failed, falling back to blob: ${svcErr?.message || svcErr}`);
|
|
1681
|
+
}
|
|
1682
|
+
const data = await getAttachment(accountId, uid, i, msg.folderId);
|
|
1683
|
+
const bytes = Uint8Array.from(atob(data.content), (c) => c.charCodeAt(0));
|
|
1684
|
+
const blob = new Blob([bytes], { type: data.contentType });
|
|
1685
|
+
const url = URL.createObjectURL(blob);
|
|
1686
|
+
const a = document.createElement("a");
|
|
1687
|
+
a.href = url;
|
|
1688
|
+
a.download = att.filename || "attachment";
|
|
1689
|
+
a.style.display = "none";
|
|
1690
|
+
document.body.appendChild(a);
|
|
1691
|
+
a.click();
|
|
1692
|
+
setTimeout(() => {
|
|
1693
|
+
a.remove();
|
|
1694
|
+
URL.revokeObjectURL(url);
|
|
1695
|
+
}, 5e3);
|
|
1679
1696
|
} catch (err) {
|
|
1680
|
-
console.error(`Attachment
|
|
1697
|
+
console.error(`Attachment open failed: ${err?.message || err}`);
|
|
1698
|
+
alert(`Couldn't open "${att.filename}": ${err?.message || err}`);
|
|
1681
1699
|
}
|
|
1682
1700
|
});
|
|
1683
1701
|
chip.draggable = true;
|