Make day-nav/language-toggle real links, group hours into rows
Deploy / deploy (push) Successful in 1m19s
Deploy / deploy (push) Successful in 1m19s
Day navigation (prev/today/next) and the language toggle were plain buttons wired to click handlers only; switched them to real <a href> elements (built via router's new exported urlFor) so right-click, middle-click, and open-in-new-tab work, with a click handler that still SPA-routes on a plain left-click and lets modified clicks fall through to normal browser navigation. Language selection is now reflected in the URL as a ?lang= query param (parsed/pushed by router.ts, omitted for the default single- English case to keep that URL clean), so a shared link preserves the viewer's chosen language(s). hour-list.ts now groups the 8 hours into three traditional rows (night office, day hours, evening) instead of one flat wrapped list. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014axryJBrRswYh2niA7WCUc
This commit is contained in:
+7
-3
@@ -60,10 +60,14 @@ export function goToToday(): void {
|
||||
setDate(todayIso());
|
||||
}
|
||||
|
||||
export function shiftDate(days: number): void {
|
||||
const d = new Date(`${state.date}T00:00:00Z`);
|
||||
export function addDays(date: string, days: number): string {
|
||||
const d = new Date(`${date}T00:00:00Z`);
|
||||
d.setUTCDate(d.getUTCDate() + days);
|
||||
setDate(d.toISOString().slice(0, 10));
|
||||
return d.toISOString().slice(0, 10);
|
||||
}
|
||||
|
||||
export function shiftDate(days: number): void {
|
||||
setDate(addDays(state.date, days));
|
||||
}
|
||||
|
||||
export function setSelectedHour(hourId: HourId): void {
|
||||
|
||||
Reference in New Issue
Block a user