@bobfrankston/rmfmail 1.2.121 → 1.2.123

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.
@@ -8542,6 +8542,7 @@ function showComposeOverlay(title = "Compose") {
8542
8542
  const SVG_ATTRS = `width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"`;
8543
8543
  const TRASH_SVG = `<svg ${SVG_ATTRS}><path d="M3 6h18"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"/><path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/></svg>`;
8544
8544
  const POPOUT_SVG = `<svg ${SVG_ATTRS}><path d="M15 3h6v6"/><path d="M10 14 21 3"/><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/></svg>`;
8545
+ const MAXIMIZE_SVG = `<svg ${SVG_ATTRS}><rect x="4" y="4" width="16" height="16" rx="2"/><path d="M4 9h16"/></svg>`;
8545
8546
  const RESTORE_SVG = `<svg ${SVG_ATTRS}><path d="M21 9v-6h-6"/><path d="M3 15v6h6"/><path d="M21 3l-7 7"/><path d="M3 21l7-7"/></svg>`;
8546
8547
  const makeIconBtn = (svg, titleStr, hoverColor) => {
8547
8548
  const b = document.createElement("button");
@@ -8561,7 +8562,18 @@ function showComposeOverlay(title = "Compose") {
8561
8562
  }
8562
8563
  });
8563
8564
  btnCluster.appendChild(discardBtn);
8564
- const popoutBtn = makeIconBtn(POPOUT_SVG, "Maximize", "#000");
8565
+ if (!isSmall) {
8566
+ const osPopoutBtn = makeIconBtn(POPOUT_SVG, "Open in separate window", "#000");
8567
+ osPopoutBtn.addEventListener("click", () => {
8568
+ try {
8569
+ const win = frame.contentWindow;
8570
+ if (win) win.dispatchEvent(new Event("compose-popout"));
8571
+ } catch {
8572
+ }
8573
+ });
8574
+ btnCluster.appendChild(osPopoutBtn);
8575
+ }
8576
+ const popoutBtn = makeIconBtn(MAXIMIZE_SVG, "Maximize", "#000");
8565
8577
  let maximized = false;
8566
8578
  let savedCss = "";
8567
8579
  popoutBtn.addEventListener("click", () => {
@@ -8573,7 +8585,7 @@ function showComposeOverlay(title = "Compose") {
8573
8585
  maximized = true;
8574
8586
  } else {
8575
8587
  wrapper.style.cssText = savedCss;
8576
- popoutBtn.innerHTML = POPOUT_SVG;
8588
+ popoutBtn.innerHTML = MAXIMIZE_SVG;
8577
8589
  popoutBtn.title = "Maximize";
8578
8590
  maximized = false;
8579
8591
  }