1
0
mirror of https://github.com/immich-app/immich.git synced 2025-06-28 05:18:38 +02:00
Files
immich/web/src/lib/components/user-settings-page/appearance-settings.svelte

25 lines
734 B
Svelte
Raw Normal View History

<script lang="ts">
import { fade } from 'svelte/transition';
import { colorTheme } from '../../stores/preferences.store';
import SettingSwitch from '../admin-page/settings/setting-switch.svelte';
export const handleToggle = () => {
$colorTheme.system = !$colorTheme.system;
};
</script>
<section class="my-4">
<div in:fade={{ duration: 500 }}>
<div class="ml-4 mt-4 flex flex-col gap-4">
<div class="ml-4">
<SettingSwitch
title="Theme selection"
subtitle="Automatically set the theme to light or dark based on your browser's system preference"
bind:checked={$colorTheme.system}
on:toggle={handleToggle}
/>
</div>
</div>
</div>
</section>