@bobfrankston/rmfmail 1.1.80 → 1.1.82

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 CHANGED
@@ -1,12 +1,9 @@
1
- Fix: opening an attachment did nothing on desktop
1
+ UX: larger viewer action icons + bigger, bolder flag star
2
2
 
3
- Clicking an attachment chip fired a programmatic <a download> click,
4
- which msger's WebView2 silently drops so nothing happened and the
5
- failure was swallowed by a console-only catch.
3
+ Message-viewer toolbar glyphs (reply / reply-all / forward / delete /
4
+ flag / mark-unread) bumped to 1.4rem with more padding for an easier
5
+ target; the "← Inbox" text label stays normal-sized.
6
6
 
7
- New service method openAttachment saves the attachment to
8
- ~/.rmfmail/attachments/ and opens it with the OS default app (start /
9
- open / xdg-open), the same in-process pattern as openInWord. The viewer
10
- now calls it on desktop, keeps the native-bridge path for Android, and
11
- falls back to the blob download only for a real browser / --server
12
- mode. Failures now surface via an alert instead of vanishing.
7
+ Message-list flag star enlarged from 0.9em to 1.45em, vertically
8
+ centered, with a gold hover preview and a stronger solid-gold colour
9
+ when flagged. Flag grid column widened 1.2em -> 1.7em to fit it.
@@ -1672,13 +1672,9 @@ async function showMessage(accountId, uid, folderId, specialUse, isRetry = false
1672
1672
  await bridge.openAttachment(att.filename, data2.contentType, data2.content);
1673
1673
  return;
1674
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
- }
1675
+ const res = await openAttachment(accountId, uid, i, msg.folderId);
1676
+ if (res)
1677
+ return;
1682
1678
  const data = await getAttachment(accountId, uid, i, msg.folderId);
1683
1679
  const bytes = Uint8Array.from(atob(data.content), (c) => c.charCodeAt(0));
1684
1680
  const blob = new Blob([bytes], { type: data.contentType });
@@ -1694,8 +1690,9 @@ async function showMessage(accountId, uid, folderId, specialUse, isRetry = false
1694
1690
  URL.revokeObjectURL(url);
1695
1691
  }, 5e3);
1696
1692
  } catch (err) {
1697
- console.error(`Attachment open failed: ${err?.message || err}`);
1698
- alert(`Couldn't open "${att.filename}": ${err?.message || err}`);
1693
+ const m = `Couldn't open "${att.filename}": ${err?.message || err}`;
1694
+ console.error(m);
1695
+ window.dispatchEvent(new CustomEvent("mailx-alert", { detail: { message: m, key: "attachment-open" } }));
1699
1696
  }
1700
1697
  });
1701
1698
  chip.draggable = true;
@@ -6681,6 +6678,10 @@ function showAlert(message, key, opts) {
6681
6678
  }
6682
6679
  }
6683
6680
  }
6681
+ window.addEventListener("mailx-alert", (e) => {
6682
+ const d = e.detail || {};
6683
+ if (d.message) showAlert(String(d.message), d.key);
6684
+ });
6684
6685
  function hideAlert() {
6685
6686
  if (alertBanner) {
6686
6687
  const key = alertBanner.dataset.key;