@mytec: iter4 ready for test

This commit is contained in:
2026-01-30 11:55:21 +02:00
parent 201aeeabd6
commit 641832bc7b
6 changed files with 100 additions and 6 deletions

View File

@@ -6,8 +6,10 @@ type Theme = 'light' | 'dark' | 'system';
interface SettingsState {
theme: Theme;
showTerrain: boolean;
terrainOpacity: number;
setTheme: (theme: Theme) => void;
setShowTerrain: (show: boolean) => void;
setTerrainOpacity: (opacity: number) => void;
}
function applyTheme(theme: Theme) {
@@ -26,11 +28,13 @@ export const useSettingsStore = create<SettingsState>()(
(set) => ({
theme: 'system' as Theme,
showTerrain: false,
terrainOpacity: 0.5,
setTheme: (theme: Theme) => {
set({ theme });
applyTheme(theme);
},
setShowTerrain: (show: boolean) => set({ showTerrain: show }),
setTerrainOpacity: (opacity: number) => set({ terrainOpacity: opacity }),
}),
{
name: 'rfcp-settings',