favicon and some TODOs

This commit is contained in:
2026-09-18 16:47:15 -04:00
parent 748702a806
commit 31d5322b38
11 changed files with 708 additions and 100 deletions
+14
View File
@@ -46,7 +46,21 @@ export class Store {
this.update({ extraExcludedDays: Math.max(0, Math.floor(count) || 0) });
}
setActualMealBlocks(value: number | null): void {
this.update({ actualMealBlocks: normalizeBalance(value) });
}
setActualFlexDollars(value: number | null): void {
this.update({ actualFlexDollars: normalizeBalance(value) });
}
private emit(): void {
for (const l of this.listeners) l();
}
}
/** Clamp an entered balance to a non-negative number, or null if blank/invalid. */
function normalizeBalance(value: number | null): number | null {
if (value === null || !Number.isFinite(value)) return null;
return Math.max(0, value);
}