diff --git a/ui/src/routes/books/[slug]/chapters/[n]/+page.svelte b/ui/src/routes/books/[slug]/chapters/[n]/+page.svelte index af91f23..876337f 100644 --- a/ui/src/routes/books/[slug]/chapters/[n]/+page.svelte +++ b/ui/src/routes/books/[slug]/chapters/[n]/+page.svelte @@ -20,6 +20,7 @@ // ── Reader settings panel ──────────────────────────────────────────────── const settingsCtx = getContext<{ current: string; fontFamily: string; fontSize: number } | undefined>('theme'); let settingsPanelOpen = $state(false); + let settingsTab = $state<'reading' | 'listening'>('reading'); const READER_THEMES = [ { id: 'amber', label: 'Amber', swatch: '#f59e0b' }, @@ -591,22 +592,14 @@ {/if} - + {#if settingsCtx} - -{#if settingsPanelOpen} - -
(settingsPanelOpen = false)} - >
-{/if} - + - + {#if settingsPanelOpen} -
-

Reader Settings

+ + +
(settingsPanelOpen = false)}>
- -
-

Theme

-
- {#each READER_THEMES as t} +
+ + +
+
+
+ + +
+ + +
+ + +
+ + {#if settingsTab === 'reading'} + + +
+

Typography

+
+ + +
+ Theme +
+ {#each READER_THEMES as t} + + {/each} +
+
+ + +
+ Font +
+ {#each READER_FONTS as f} + + {/each} +
+
+ + +
+ Size +
+ {#each READER_SIZES as s} + + {/each} +
+
+ +
+
+ + +
+

Layout

+
+ + +
+ Mode +
+ {#each ([['scroll', 'Scroll'], ['paginated', 'Pages']] as const) as [mode, lbl]} + + {/each} +
+
+ + +
+ Spacing +
+ {#each ([['compact', 'Tight'], ['normal', 'Normal'], ['relaxed', 'Loose']] as const) as [s, lbl]} + + {/each} +
+
+ + +
+ Width +
+ {#each ([['narrow', 'Narrow'], ['normal', 'Normal'], ['wide', 'Wide']] as const) as [w, lbl]} + + {/each} +
+
+ + +
+ Paragraphs +
+ {#each ([['spaced', 'Spaced'], ['indented', 'Indented']] as const) as [s, lbl]} + + {/each} +
+
+ + - {/each} -
-
- -
-

Font

-
- {#each READER_FONTS as f} +
+
+ + {:else} + + +
+

Player

+
+ + +
+ Style +
+ {#each ([['standard', 'Standard'], ['compact', 'Compact']] as const) as [s, lbl]} + + {/each} +
+
+ + {#if page.data.user} + + +
+ Speed +
+ {#each [0.75, 1, 1.25, 1.5, 2] as s} + + {/each} +
+
+ + - {/each} -
-
- -
-

Text size

-
- {#each READER_SIZES as s} + - {/each} + + {/if} + +
+ + {/if} + +

Changes save automatically

+
- - -
- - -
-

Read mode

-
- {#each ([['scroll', 'Scroll'], ['paginated', 'Pages']] as const) as [mode, label]} - - {/each} -
-
- - -
-

Line spacing

-
- {#each ([['compact', 'Tight'], ['normal', 'Normal'], ['relaxed', 'Loose']] as const) as [s, label]} - - {/each} -
-
- - -
-

Width

-
- {#each ([['narrow', 'Narrow'], ['normal', 'Normal'], ['wide', 'Wide']] as const) as [w, label]} - - {/each} -
-
- - -
-

Paragraphs

-
- {#each ([['spaced', 'Spaced'], ['indented', 'Indented']] as const) as [s, label]} - - {/each} -
-
- - - - - -
-

Listening

- - -
-

Player style

-
- {#each ([['standard', 'Standard'], ['compact', 'Compact']] as const) as [s, label]} - - {/each} -
-
- - {#if page.data.user} - -
-

Speed

-
- {#each [0.75, 1, 1.25, 1.5, 2] as s} - - {/each} -
-
- - - - - - - {/if} - -

Changes save automatically

{/if} {/if}