Fix Docker build error; add multi-year view, PDF export, ntfy notifier
Fix: remove unused 'accessibleMonths' variable (tsc exit code 2) Features: - AllYearsLetter view: all years in chronological order, reachable from "All Years" at the top of the sidebar - PDF export: window.print() with @media print CSS — sidebar, toolbar, and chrome hidden; each year starts on a new page via page-break - "Download all" exports a plain-text file of every year's letter - ntfy notifier: standalone Node.js service (notifier/) that fires a push notification via ntfy on the 1st of each month; configurable via NTFY_TOPIC, NTFY_URL, CRON_SCHEDULE, APP_URL env vars - docker-compose: adds `notifier` service alongside `app`; reads from .env (example in .env.example); NTFY_TEST_ON_START=true sends a test ping on container start Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
54d54c2e1a
commit
7f38c038fb
11 files changed
+275
-2
No files matched your search
@@ -6,7 +6,8 @@ export type View =
|
||||
| { kind: "month"; year: number; month: number }
|
||||
| { kind: "yearEnd"; year: number }
|
||||
| { kind: "letter"; year: number }
|
||||
| { kind: "podcast"; year: number };
|
||||
| { kind: "podcast"; year: number }
|
||||
| { kind: "allYears" };
|
||||
|
||||
interface SidebarProps {
|
||||
data: AppData;
|
||||
@@ -36,6 +37,17 @@ export function Sidebar({
|
||||
<span className="brand-name">Annual Letter</span>
|
||||
</button>
|
||||
|
||||
<ul className="sidebar-months" style={{ marginBottom: 8 }}>
|
||||
<li>
|
||||
<button
|
||||
className={`sidebar-item sidebar-letter ${view.kind === "allYears" ? "active" : ""}`}
|
||||
onClick={() => onViewChange({ kind: "allYears" })}
|
||||
>
|
||||
<span className="sidebar-item-name">📚 All Years</span>
|
||||
</button>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{years.map((year) => {
|
||||
const monthEntries = data.monthlyEntries.filter((e) => e.year === year);
|
||||
const yearEndEntry = data.yearEndEntries.find((e) => e.year === year);
|
||||
|
||||
Reference in new issue
Block a user