mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
* feat(web,a11y): replace IconButton with CircleIconButton * wip: cleanup * wip: bring back viewbox * fix: add label to search bar
13 lines
600 B
Svelte
13 lines
600 B
Svelte
<script lang="ts">
|
|
import { moonPath, moonViewBox, sunPath, sunViewBox } from '$lib/assets/svg-paths';
|
|
import CircleIconButton from '$lib/components/elements/buttons/circle-icon-button.svelte';
|
|
import { Theme } from '$lib/constants';
|
|
import { colorTheme, handleToggleTheme } from '$lib/stores/preferences.store';
|
|
|
|
$: icon = $colorTheme.value === Theme.LIGHT ? moonPath : sunPath;
|
|
$: viewBox = $colorTheme.value === Theme.LIGHT ? moonViewBox : sunViewBox;
|
|
</script>
|
|
|
|
{#if !$colorTheme.system}
|
|
<CircleIconButton title="Toggle theme" {icon} {viewBox} on:click={handleToggleTheme} />
|
|
{/if}
|