@bobfrankston/rmfmail 1.2.2 → 1.2.4
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 -12
- package/client/app.bundle.js.map +2 -2
- package/client/app.js +14 -12
- package/client/app.js.map +1 -1
- package/client/app.ts +11 -12
- package/client/components/message-viewer.js +9 -2
- package/client/components/message-viewer.js.map +1 -1
- package/client/components/message-viewer.ts +3 -2
- package/client/lib/mailxapi.js +23 -2
- package/package.json +3 -3
- package/packages/mailx-imap/index.d.ts.map +1 -1
- package/packages/mailx-imap/index.js +10 -8
- package/packages/mailx-imap/index.js.map +1 -1
- package/packages/mailx-imap/index.ts +10 -8
- package/packages/mailx-imap/package-lock.json +2 -2
- package/packages/mailx-imap/package.json +1 -1
- package/packages/mailx-service/index.d.ts +27 -1
- package/packages/mailx-service/index.d.ts.map +1 -1
- package/packages/mailx-service/index.js +86 -7
- package/packages/mailx-service/index.js.map +1 -1
- package/packages/mailx-service/index.ts +73 -8
- package/packages/mailx-service/jsonrpc.js +2 -0
- package/packages/mailx-service/jsonrpc.js.map +1 -1
- package/packages/mailx-service/jsonrpc.ts +2 -0
- package/packages/mailx-store/package.json +1 -1
package/client/app.bundle.js
CHANGED
|
@@ -964,7 +964,13 @@ function showPreviewBodyMenu(absX, absY, selectedText, sourceWindow, linkUrl, li
|
|
|
964
964
|
return "";
|
|
965
965
|
}
|
|
966
966
|
})();
|
|
967
|
-
items.push({ label: "Open link in browser", action: () =>
|
|
967
|
+
items.push({ label: "Open link in browser", action: () => {
|
|
968
|
+
const api = window.mailxapi;
|
|
969
|
+
if (api?.openExternal)
|
|
970
|
+
api.openExternal(linkUrl);
|
|
971
|
+
else
|
|
972
|
+
window.open(linkUrl, "_blank", "noopener,noreferrer");
|
|
973
|
+
} }, { label: guessName ? `Save link as "${guessName}"\u2026` : "Save link as\u2026", action: () => {
|
|
968
974
|
const a = document.createElement("a");
|
|
969
975
|
a.href = linkUrl;
|
|
970
976
|
a.download = guessName || "";
|
|
@@ -1055,7 +1061,11 @@ function showPreviewBodyMenu(absX, absY, selectedText, sourceWindow, linkUrl, li
|
|
|
1055
1061
|
action: () => {
|
|
1056
1062
|
const text = (selectedText || fullBody()).slice(0, 4500);
|
|
1057
1063
|
const url = `https://translate.google.com/?sl=auto&tl=en&op=translate&text=${encodeURIComponent(text)}`;
|
|
1058
|
-
window.
|
|
1064
|
+
const api = window.mailxapi;
|
|
1065
|
+
if (api?.openExternal)
|
|
1066
|
+
api.openExternal(url);
|
|
1067
|
+
else
|
|
1068
|
+
window.open(url, "_blank", "noopener,noreferrer");
|
|
1059
1069
|
}
|
|
1060
1070
|
},
|
|
1061
1071
|
{ label: "", action: () => {
|
|
@@ -8889,19 +8899,15 @@ window.addEventListener("message", (e) => {
|
|
|
8889
8899
|
return;
|
|
8890
8900
|
}
|
|
8891
8901
|
if (e.data?.type === "openLink" && e.data.url) {
|
|
8892
|
-
window.
|
|
8902
|
+
const api = window.mailxapi;
|
|
8903
|
+
if (api?.openExternal) api.openExternal(e.data.url);
|
|
8904
|
+
else window.open(e.data.url, "_blank", "noopener,noreferrer");
|
|
8893
8905
|
}
|
|
8894
8906
|
if (e.data?.type === "linkClick" && e.data.url) {
|
|
8895
8907
|
const url = e.data.url;
|
|
8896
|
-
|
|
8897
|
-
|
|
8898
|
-
|
|
8899
|
-
f.src = `mailxapi://openurl?url=${encodeURIComponent(url)}`;
|
|
8900
|
-
document.body.appendChild(f);
|
|
8901
|
-
setTimeout(() => f.remove(), 500);
|
|
8902
|
-
} else {
|
|
8903
|
-
window.open(url, "_blank", "noopener,noreferrer");
|
|
8904
|
-
}
|
|
8908
|
+
const api = window.mailxapi;
|
|
8909
|
+
if (api?.openExternal) api.openExternal(url);
|
|
8910
|
+
else window.open(url, "_blank", "noopener,noreferrer");
|
|
8905
8911
|
}
|
|
8906
8912
|
if (e.data?.type === "previewToggleFullscreen") {
|
|
8907
8913
|
toggleFullscreenPreview();
|