@bobfrankston/rmfmail 1.2.119 → 1.2.121

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.js CHANGED
@@ -5593,7 +5593,29 @@ getSettings().then((s) => {
5593
5593
  optEditorTiptap.checked = ed === "tiptap";
5594
5594
  if (optEditorTinymce)
5595
5595
  optEditorTinymce.checked = ed === "tinymce";
5596
+ const fontEl = document.getElementById("opt-compose-font-size");
5597
+ if (fontEl) {
5598
+ const px = Number(s.ui?.composeFontSize);
5599
+ fontEl.value = String(Number.isFinite(px) && px >= 8 && px <= 32 ? px : 15);
5600
+ }
5596
5601
  }).catch(() => { });
5602
+ // Unified compose editing font size (px). Same sync-cache-then-persist shape
5603
+ // as saveEditorSetting: compose.ts reads `mailx-compose-font-size` from
5604
+ // localStorage at module load, so the very next compose-open is correct.
5605
+ document.getElementById("opt-compose-font-size")?.addEventListener("change", (e) => {
5606
+ const el = e.target;
5607
+ const px = Number(el.value);
5608
+ if (!Number.isFinite(px) || px < 8 || px > 32)
5609
+ return;
5610
+ try {
5611
+ localStorage.setItem("mailx-compose-font-size", String(px));
5612
+ }
5613
+ catch { /* */ }
5614
+ getSettings().then((settings) => {
5615
+ settings.ui = { ...settings.ui, composeFontSize: px };
5616
+ saveSettings(settings);
5617
+ }).catch(() => { });
5618
+ });
5597
5619
  // Save editor choice to server settings
5598
5620
  function saveEditorSetting(editor) {
5599
5621
  // Update the localStorage cache SYNCHRONOUSLY. compose.ts reads