refactor: server config and feature flags managers (#23894)

This commit is contained in:
Daniel Dietzler
2025-11-14 20:10:44 +01:00
committed by GitHub
parent f11bfb9581
commit 1200bfad13
68 changed files with 378 additions and 416 deletions

View File

@@ -11,10 +11,10 @@
<script lang="ts">
import { afterNavigate } from '$app/navigation';
import { Theme } from '$lib/constants';
import { serverConfigManager } from '$lib/managers/server-config-manager.svelte';
import { themeManager } from '$lib/managers/theme-manager.svelte';
import MapSettingsModal from '$lib/modals/MapSettingsModal.svelte';
import { mapSettings } from '$lib/stores/preferences.store';
import { serverConfig } from '$lib/stores/system-config-manager.svelte';
import { getAssetThumbnailUrl, handlePromiseError } from '$lib/utils';
import { getMapMarkers, type MapMarkerResponseDto } from '@immich/sdk';
import { Icon, modalManager } from '@immich/ui';
@@ -103,7 +103,9 @@
let abortController: AbortController;
const theme = $derived($mapSettings.allowDarkMode ? themeManager.value : Theme.LIGHT);
const styleUrl = $derived(theme === Theme.DARK ? $serverConfig.mapDarkStyleUrl : $serverConfig.mapLightStyleUrl);
const styleUrl = $derived(
theme === Theme.DARK ? serverConfigManager.value.mapDarkStyleUrl : serverConfigManager.value.mapLightStyleUrl,
);
export function addClipMapMarker(lng: number, lat: number) {
if (map) {