mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
feat(web): auto switch theme (#6176)
* 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>
This commit is contained in:
parent
41a32b4e6b
commit
84e60ea155
9 changed files with 144 additions and 52 deletions
|
|
@ -22,6 +22,7 @@
|
|||
import Icon from '$lib/components/elements/icon.svelte';
|
||||
import { mdiCog, mdiMapMarker } from '@mdi/js';
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
import { Theme } from '$lib/constants';
|
||||
|
||||
export let mapMarkers: MapMarkerResponseDto[];
|
||||
export let showSettingsModal: boolean | undefined = undefined;
|
||||
|
|
@ -36,7 +37,7 @@
|
|||
|
||||
$: style = (async () => {
|
||||
const { data } = await api.systemConfigApi.getMapStyle({
|
||||
theme: $mapSettings.allowDarkMode ? $colorTheme : 'light',
|
||||
theme: $mapSettings.allowDarkMode ? $colorTheme.value : Theme.LIGHT,
|
||||
});
|
||||
return data as StyleSpecification;
|
||||
})();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue