From c2016e1c7a95111ce202761513333a42ff3867a4 Mon Sep 17 00:00:00 2001 From: iamdoubz <> Date: Thu, 5 Nov 2026 16:08:42 -0600 Subject: [PATCH] Add settings screen --- frontend/src/routes/SettingsPage.svelte | 257 ++++++++++++++++++++++++ 1 file changed, 257 insertions(+) create mode 100644 frontend/src/routes/SettingsPage.svelte diff --git a/frontend/src/routes/SettingsPage.svelte b/frontend/src/routes/SettingsPage.svelte new file mode 100644 index 0000000..38376a6 --- /dev/null +++ b/frontend/src/routes/SettingsPage.svelte @@ -0,0 +1,257 @@ + + +{#snippet actions(path: string, key: string)} +
+
+ + +
+ {#if editing?.id} + + {/if} +
+{/snippet} + +{#snippet childBoxes(group: number[])} +
+ Children +
+ {#each h.children as c (c.id)} + + {/each} +
+
+{/snippet} + +

Settings

+ +
+

Appearance

+
+ {#each [['system', 'Match this device'], ['light', 'Light'], ['dark', 'Dark']] as [value, label]} + + {/each} +
+
+ +
+

Time zone

+

Events are exported in {h.timezone}.

+ {#if deviceZone && deviceZone !== h.timezone} + + {/if} +
+ +

Children

+ +{#if editing?.kind === 'child' && editing.id === null} +
+
+ {@render actions('', '')} +
+{:else} + +{/if} + +

Calendars

+

A calendar is what you download or subscribe to: one per child, or one for the whole family.

+ +{#if editing?.kind === 'calendar' && editing.id === null} +
{@render calendarForm()}
+{:else} + +{/if} + +{#snippet calendarForm()} +
+
+ {@render childBoxes(calendar.child_ids)} +
+ Sources (none checked: all of them) +
+ {#each h.sources as s (s.id)} + + {/each} +
+
+
+ + +
+ {@render actions(`/calendars/${editing?.id}`, `calendar-${editing?.id}`)} +
+{/snippet} + +

Sources

+

Each paper you scan: the district calendar, a class newsletter, a lunch menu, a team schedule.

+ +{#if editing?.kind === 'source' && editing.id === null} +
{@render sourceForm()}
+{:else} + +{/if} + +{#snippet sourceForm()} +
+
+
+ + +
+ {@render childBoxes(source.child_ids)} + +
+ + +

Items for other grades or teams start unchecked in review.

+
+
+ + +
+
+ + +
+
+ {@render actions(`/sources/${editing?.id}`, `source-${editing?.id}`)} +
+{/snippet} + +