forked from hplush/slowreader
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinterface.svelte
More file actions
43 lines (41 loc) · 1.27 KB
/
interface.svelte
File metadata and controls
43 lines (41 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<script lang="ts">
import { mdiThemeLightDark, mdiWeatherNight, mdiWeatherSunny } from '@mdi/js'
import {
settingsMessages as t,
theme,
useQuietCursor,
useReducedMotion
} from '@slowreader/core'
import { systemReducedMotion } from '../stores/media-queries.ts'
import Radio from '../ui/radio.svelte'
import Stack from '../ui/stack.svelte'
import Switch from '../ui/switch.svelte'
import ThinPage from '../ui/thin-page.svelte'
import Title from '../ui/title.svelte'
</script>
<ThinPage title={[$t.interfaceTitle, $t.commonTitle]}>
<Stack gap="xl">
<Title>{$t.applicationInterface}</Title>
<Stack gap="m">
<Radio
label={$t.theme}
onchange={value => {
theme.set(value)
}}
size="wide"
value={$theme}
values={[
['light', $t.themeLight, mdiWeatherSunny],
['system', $t.themeSystem, mdiThemeLightDark],
['dark', $t.themeDark, mdiWeatherNight]
]}
/>
<Switch label={$t.usePointer} reverseStore={useQuietCursor} />
{#if $systemReducedMotion}
<Switch disabled label={$t.systemDisabledAnimations} />
{:else}
<Switch label={$t.useAnimations} reverseStore={useReducedMotion} />
{/if}
</Stack>
</Stack>
</ThinPage>