mirror of
https://github.com/immich-app/immich.git
synced 2026-02-13 04:17:56 +03:00
* fix(web): persisted store * fix: translation * fix: test * fix: test * revert i18n changes * fix blank locale
21 lines
668 B
Svelte
21 lines
668 B
Svelte
<script lang="ts">
|
|
import { defaultLang, langs, Theme } from '$lib/constants';
|
|
import { themeManager } from '$lib/managers/theme-manager.svelte';
|
|
import { lang } from '$lib/stores/preferences.store';
|
|
import { ThemeSwitcher } from '@immich/ui';
|
|
import { get } from 'svelte/store';
|
|
</script>
|
|
|
|
{#if !themeManager.theme.system}
|
|
{#await langs
|
|
.find((item) => item.code === get(lang))
|
|
?.loader() ?? defaultLang.loader() then { default: translations }}
|
|
<ThemeSwitcher
|
|
size="medium"
|
|
color="secondary"
|
|
{translations}
|
|
onChange={(theme) => themeManager.setTheme(theme == 'dark' ? Theme.DARK : Theme.LIGHT)}
|
|
/>
|
|
{/await}
|
|
{/if}
|