@bobfrankston/rmfmail 1.2.100 → 1.2.101

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
@@ -4101,6 +4101,7 @@ function openShortcutsDialog() {
4101
4101
  const viewBtn = document.getElementById("btn-view");
4102
4102
  const viewDropdown = document.getElementById("view-dropdown");
4103
4103
  const optTwoLine = document.getElementById("opt-two-line");
4104
+ const optEleanor = document.getElementById("opt-eleanor");
4104
4105
  const optPreview = document.getElementById("opt-preview");
4105
4106
  const optSnippet = document.getElementById("opt-snippet");
4106
4107
  const optFlagStars = document.getElementById("opt-flag-stars");
@@ -4293,6 +4294,7 @@ document.addEventListener("keydown", (e) => {
4293
4294
  });
4294
4295
  // Restore saved view settings
4295
4296
  const savedTwoLine = localStorage.getItem("mailx-two-line") === "true";
4297
+ const savedEleanor = localStorage.getItem("mailx-eleanor-view") === "true";
4296
4298
  const savedPreview = localStorage.getItem("mailx-preview") !== "false"; // default true
4297
4299
  const savedSnippet = localStorage.getItem("mailx-snippet") !== "false"; // default true
4298
4300
  const savedFlagStars = localStorage.getItem("mailx-flag-stars") !== "false"; // default true (show)
@@ -4310,6 +4312,8 @@ catch { /* private mode */ }
4310
4312
  const savedFolderCounts = localStorage.getItem("mailx-folder-counts") === "true";
4311
4313
  if (optTwoLine)
4312
4314
  optTwoLine.checked = savedTwoLine;
4315
+ if (optEleanor)
4316
+ optEleanor.checked = savedEleanor;
4313
4317
  if (optPreview)
4314
4318
  optPreview.checked = savedPreview;
4315
4319
  if (optSnippet)
@@ -4324,6 +4328,8 @@ if (optFolderCounts)
4324
4328
  optFolderCounts.checked = savedFolderCounts;
4325
4329
  if (savedTwoLine)
4326
4330
  document.getElementById("message-list")?.classList.add("two-line");
4331
+ if (savedEleanor)
4332
+ document.getElementById("message-list")?.classList.add("eleanor-view");
4327
4333
  if (!savedPreview)
4328
4334
  document.querySelector(".main-area")?.classList.add("no-preview");
4329
4335
  if (!savedSnippet)
@@ -4536,6 +4542,38 @@ optTwoLine?.addEventListener("change", () => {
4536
4542
  }
4537
4543
  localStorage.setItem("mailx-two-line", String(optTwoLine.checked));
4538
4544
  });
4545
+ // Eleanor view toggle — Thunderbird-classic one-line summary list
4546
+ // (★ | Subject | From | Date, whitespace, monochrome). Pure CSS class;
4547
+ // the row markup is unchanged. TODO.md: generalize into per-column view
4548
+ // control instead of a named preset.
4549
+ function applyEleanorView(on) {
4550
+ document.getElementById("message-list")?.classList.toggle("eleanor-view", on);
4551
+ if (optEleanor)
4552
+ optEleanor.checked = on;
4553
+ try {
4554
+ localStorage.setItem("mailx-eleanor-view", String(on));
4555
+ }
4556
+ catch { /* private mode */ }
4557
+ }
4558
+ optEleanor?.addEventListener("change", () => {
4559
+ applyEleanorView(optEleanor.checked);
4560
+ // Mirror to preferences.jsonc (ui.eleanorView) so the choice follows the
4561
+ // shared config across machines; localStorage stays the synchronous
4562
+ // first-paint cache, same split as the editor setting.
4563
+ getSettings().then((settings) => {
4564
+ settings.ui = { ...settings.ui, eleanorView: optEleanor.checked };
4565
+ saveSettings(settings);
4566
+ }).catch(() => { });
4567
+ });
4568
+ // A ui.eleanorView value in preferences.jsonc wins over the local cache once
4569
+ // it arrives — so the view can be enabled by editing the shared config file
4570
+ // directly, without touching the View menu on that machine.
4571
+ getSettings().then((s) => {
4572
+ const pref = s.ui?.eleanorView;
4573
+ if (typeof pref === "boolean" && pref !== (localStorage.getItem("mailx-eleanor-view") === "true")) {
4574
+ applyEleanorView(pref);
4575
+ }
4576
+ }).catch(() => { });
4539
4577
  // Preview pane toggle
4540
4578
  optPreview?.addEventListener("change", () => {
4541
4579
  const main = document.querySelector(".main-area");