@bobfrankston/rmfmail 1.0.667 → 1.0.668
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/TODO.md +2 -0
- package/bin/mailx.js +114 -111
- package/bin/mailx.js.map +1 -1
- package/bin/mailx.ts +117 -95
- package/client/app.bundle.js +98 -24
- package/client/app.bundle.js.map +2 -2
- package/client/components/alarms.js +106 -29
- package/client/components/alarms.js.map +1 -1
- package/client/components/alarms.ts +109 -31
- package/client/components/calendar-sidebar.js +19 -12
- package/client/components/calendar-sidebar.js.map +1 -1
- package/client/components/calendar-sidebar.ts +21 -12
- package/client/compose/compose.bundle.js.map +1 -1
- package/client/index.html +3 -0
- package/client/lib/api-client.ts +1 -1
- package/package.json +1 -1
- package/packages/mailx-host/index.d.ts +5 -0
- package/packages/mailx-host/index.d.ts.map +1 -1
- package/packages/mailx-host/index.js +5 -0
- package/packages/mailx-host/index.js.map +1 -1
- package/packages/mailx-host/index.ts +5 -0
- package/packages/mailx-host/package.json +1 -1
- package/packages/mailx-service/index.d.ts +1 -0
- package/packages/mailx-service/index.d.ts.map +1 -1
- package/packages/mailx-service/index.js +68 -36
- package/packages/mailx-service/index.js.map +1 -1
- package/packages/mailx-service/index.ts +67 -37
|
@@ -599,25 +599,34 @@ export function initCalendarSidebar(): void {
|
|
|
599
599
|
refresh();
|
|
600
600
|
});
|
|
601
601
|
}
|
|
602
|
-
//
|
|
603
|
-
// because the daemon
|
|
604
|
-
//
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
602
|
+
// Holiday-calendar toggles. Each lives in service settings (not
|
|
603
|
+
// localStorage) because the daemon's refresh loop decides which
|
|
604
|
+
// calendars to pull — the preference has to round-trip to it.
|
|
605
|
+
// Two separate Google public calendars today: US federal holidays
|
|
606
|
+
// and Jewish holidays. Generalization to arbitrary user-supplied
|
|
607
|
+
// calendars is filed as Q140 (low priority unless the audience
|
|
608
|
+
// broadens beyond Bob).
|
|
609
|
+
const wireHolidayCheckbox = (
|
|
610
|
+
cbId: string,
|
|
611
|
+
settingsKey: "showHolidays" | "showJewishHolidays",
|
|
612
|
+
): void => {
|
|
613
|
+
const cb = document.getElementById(cbId) as HTMLInputElement | null;
|
|
614
|
+
if (!cb || (cb as any).__wired) return;
|
|
615
|
+
(cb as any).__wired = true;
|
|
608
616
|
getSettings().then((s: any) => {
|
|
609
|
-
|
|
617
|
+
cb.checked = !!s?.calendar?.[settingsKey];
|
|
610
618
|
}).catch(() => { /* */ });
|
|
611
|
-
|
|
619
|
+
cb.addEventListener("change", async () => {
|
|
612
620
|
try {
|
|
613
621
|
const s = await getSettings();
|
|
614
|
-
s.calendar = { ...(s.calendar || {}),
|
|
622
|
+
s.calendar = { ...(s.calendar || {}), [settingsKey]: cb.checked };
|
|
615
623
|
await saveSettings(s);
|
|
616
|
-
} catch (e: any) { console.error(
|
|
617
|
-
// Service picks up the new value on the next refresh tick.
|
|
624
|
+
} catch (e: any) { console.error(`[cal] ${settingsKey} save failed:`, e); }
|
|
618
625
|
refresh();
|
|
619
626
|
});
|
|
620
|
-
}
|
|
627
|
+
};
|
|
628
|
+
wireHolidayCheckbox("cal-side-show-holidays", "showHolidays");
|
|
629
|
+
wireHolidayCheckbox("cal-side-show-jewish-holidays", "showJewishHolidays");
|
|
621
630
|
// Horizon input — how many days ahead to list events. Bounded 1..365.
|
|
622
631
|
const horizonInput = document.getElementById("cal-side-horizon") as HTMLInputElement | null;
|
|
623
632
|
if (horizonInput && !(horizonInput as any).__wired) {
|