@bobfrankston/rmfmail 1.1.112 → 1.1.114

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.
@@ -892,44 +892,55 @@ function showPreviewBodyMenu(absX, absY, selectedText, sourceWindow, linkUrl, li
892
892
  if (senderAddr) {
893
893
  items.push({ label: `Search messages from ${senderAddr}`, action: () => runSearch(`from:${senderAddr}`) });
894
894
  }
895
- items.push({ label: "", action: () => {
896
- }, separator: true }, {
897
- label: selectedText ? "Translate selection (AI)" : "Translate message (AI)",
898
- action: () => translateAndShow(selectedText || fullBody())
899
- }, {
900
- label: selectedText ? "Translate selection (Google Translate)" : "Translate message (Google Translate)",
901
- action: () => {
902
- const text = (selectedText || fullBody()).slice(0, 4500);
903
- const url = `https://translate.google.com/?sl=auto&tl=en&op=translate&text=${encodeURIComponent(text)}`;
904
- window.open(url, "_blank", "noopener,noreferrer");
905
- }
906
- }, { label: "", action: () => {
907
- }, separator: true }, { label: "Zoom in", action: () => {
908
- for (const f of Array.from(document.querySelectorAll("iframe"))) {
909
- const d = f.contentDocument;
910
- if (d) {
911
- setZoom(previewZoom + ZOOM_STEP, d);
912
- break;
895
+ items.push(
896
+ { label: "", action: () => {
897
+ }, separator: true },
898
+ {
899
+ label: selectedText ? "Translate selection (AI)" : "Translate message (AI)",
900
+ action: () => translateAndShow(selectedText || fullBody())
901
+ },
902
+ {
903
+ label: selectedText ? "Translate selection (Google Translate)" : "Translate message (Google Translate)",
904
+ action: () => {
905
+ const text = (selectedText || fullBody()).slice(0, 4500);
906
+ const url = `https://translate.google.com/?sl=auto&tl=en&op=translate&text=${encodeURIComponent(text)}`;
907
+ window.open(url, "_blank", "noopener,noreferrer");
913
908
  }
914
- }
915
- } }, { label: "Zoom out", action: () => {
916
- for (const f of Array.from(document.querySelectorAll("iframe"))) {
917
- const d = f.contentDocument;
918
- if (d) {
919
- setZoom(previewZoom - ZOOM_STEP, d);
920
- break;
909
+ },
910
+ { label: "", action: () => {
911
+ }, separator: true },
912
+ // Zoom group — current level (resets on click) first, then in / out.
913
+ { label: `Zoom: ${pct}% \u2014 reset`, action: () => {
914
+ for (const f of Array.from(document.querySelectorAll("iframe"))) {
915
+ const d = f.contentDocument;
916
+ if (d) {
917
+ setZoom(1, d);
918
+ break;
919
+ }
921
920
  }
922
- }
923
- } }, { label: `Reset zoom (${pct}%)`, action: () => {
924
- for (const f of Array.from(document.querySelectorAll("iframe"))) {
925
- const d = f.contentDocument;
926
- if (d) {
927
- setZoom(1, d);
928
- break;
921
+ } },
922
+ { label: "Zoom in (+)", action: () => {
923
+ for (const f of Array.from(document.querySelectorAll("iframe"))) {
924
+ const d = f.contentDocument;
925
+ if (d) {
926
+ setZoom(previewZoom + ZOOM_STEP, d);
927
+ break;
928
+ }
929
929
  }
930
- }
931
- } }, { label: "", action: () => {
932
- }, separator: true }, { label: "Print\u2026 (Ctrl+P)", action: () => printCurrentMessage() });
930
+ } },
931
+ { label: "Zoom out (\u2212)", action: () => {
932
+ for (const f of Array.from(document.querySelectorAll("iframe"))) {
933
+ const d = f.contentDocument;
934
+ if (d) {
935
+ setZoom(previewZoom - ZOOM_STEP, d);
936
+ break;
937
+ }
938
+ }
939
+ } },
940
+ { label: "", action: () => {
941
+ }, separator: true },
942
+ { label: "Print\u2026 (Ctrl+P)", action: () => printCurrentMessage() }
943
+ );
933
944
  showContextMenu(absX, absY, items);
934
945
  }
935
946
  function toggleFullscreenPreview() {
@@ -7014,6 +7025,7 @@ var backToList = (e) => {
7014
7025
  document.getElementById("btn-back")?.addEventListener("click", backToList);
7015
7026
  document.getElementById("btn-back")?.addEventListener("touchend", backToList);
7016
7027
  document.getElementById("mv-popout")?.addEventListener("click", () => popOutCurrentMessage());
7028
+ document.getElementById("btn-print")?.addEventListener("click", () => printCurrentMessage());
7017
7029
  document.getElementById("folder-tree")?.addEventListener("click", (e) => {
7018
7030
  if (window.innerWidth <= 768 && e.target.closest(".ft-folder")) {
7019
7031
  document.querySelector(".folder-panel")?.classList.remove("open");