mirror of
https://github.com/immich-app/immich.git
synced 2025-06-04 22:24:26 -04:00
* move from app.html to user-page-layout.svelte * fix: use layout.svelte * simplify * fix: map style don't change * fix: auto switch theme map * use constants * simplify * rename * rename settign * fix: remove * pr feedback * fix: tests * fix: migration * fix: migration * pr feedback * simplify * simplify * pr feedback * fix: merge * chore: set insetad of toggle on click --------- Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
58 lines
2.2 KiB
Svelte
58 lines
2.2 KiB
Svelte
<script lang="ts">
|
|
import { mdiArrowRight } from '@mdi/js';
|
|
import Button from '../elements/buttons/button.svelte';
|
|
import Icon from '../elements/icon.svelte';
|
|
import OnboardingCard from './onboarding-card.svelte';
|
|
import { createEventDispatcher } from 'svelte';
|
|
import { colorTheme } from '$lib/stores/preferences.store';
|
|
import { moonPath, moonViewBox, sunPath, sunViewBox } from '$lib/assets/svg-paths';
|
|
import { Theme } from '$lib/constants';
|
|
|
|
const dispatch = createEventDispatcher<{
|
|
done: void;
|
|
previous: void;
|
|
}>();
|
|
</script>
|
|
|
|
<OnboardingCard>
|
|
<p class="text-xl text-immich-primary dark:text-immich-dark-primary">COLOR THEME</p>
|
|
|
|
<div>
|
|
<p class="pb-6 font-light">Choose a color theme for your instance. You can change this later in your settings.</p>
|
|
</div>
|
|
|
|
<div class="flex gap-4 mb-6">
|
|
<button
|
|
class="w-1/2 aspect-square bg-immich-bg rounded-3xl transition-all shadow-sm hover:shadow-xl border-[3px] border-immich-dark-primary/80 border-immich-primary dark:border dark:border-transparent"
|
|
on:click={() => ($colorTheme.value = Theme.LIGHT)}
|
|
>
|
|
<div
|
|
class="flex flex-col place-items-center place-content-center justify-around h-full w-full text-immich-primary"
|
|
>
|
|
<Icon path={sunPath} viewBox={sunViewBox} size="96" />
|
|
<p class="font-semibold text-4xl">LIGHT</p>
|
|
</div>
|
|
</button>
|
|
<button
|
|
class="w-1/2 aspect-square bg-immich-dark-bg rounded-3xl dark:border-[3px] dark:border-immich-dark-primary/80 dark:border-immich-dark-primary border border-transparent"
|
|
on:click={() => ($colorTheme.value = Theme.DARK)}
|
|
>
|
|
<div
|
|
class="flex flex-col place-items-center place-content-center justify-around h-full w-full text-immich-dark-primary"
|
|
>
|
|
<Icon path={moonPath} viewBox={moonViewBox} size="96" />
|
|
<p class="font-semibold text-4xl">DARK</p>
|
|
</div>
|
|
</button>
|
|
</div>
|
|
|
|
<div class="flex">
|
|
<div class="w-full flex place-content-end">
|
|
<Button class="flex gap-2 place-content-center" on:click={() => dispatch('done')}>
|
|
<p>Storage Template</p>
|
|
<Icon path={mdiArrowRight} size="18" />
|
|
</Button>
|
|
</div>
|
|
</div>
|
|
</OnboardingCard>
|