+
-
+
-
Xdebug
-
+
Xdebug
+
{project.xdebug_enabled ? 'Enabled' : 'Off'}
diff --git a/src/renderer/src/components/settings/SettingsModal.tsx b/src/renderer/src/components/settings/SettingsModal.tsx
index f133fe5..30ad402 100644
--- a/src/renderer/src/components/settings/SettingsModal.tsx
+++ b/src/renderer/src/components/settings/SettingsModal.tsx
@@ -4,8 +4,7 @@ import { useThemeStore, type Theme } from '../../stores/themeStore'
const THEMES: { value: Theme; label: string }[] = [
{ value: 'light', label: 'Light' },
- { value: 'dark', label: 'Dark' },
- { value: 'system', label: 'System' }
+ { value: 'dark', label: 'Dark' }
]
const SHORTCUTS = [
diff --git a/src/renderer/src/hooks/useAppliedTheme.ts b/src/renderer/src/hooks/useAppliedTheme.ts
index 7c443c1..09e66d9 100644
--- a/src/renderer/src/hooks/useAppliedTheme.ts
+++ b/src/renderer/src/hooks/useAppliedTheme.ts
@@ -1,7 +1,7 @@
import { useEffect } from 'react'
import { useThemeStore } from '../stores/themeStore'
-// Applies the resolved theme (light/dark/system) to ,
+// Applies the selected light/dark theme to ,
// which is what the `@custom-variant dark` rule in main.css keys off. Must
// run somewhere mounted once near the app root.
export function useAppliedTheme(): void {
@@ -9,19 +9,6 @@ export function useAppliedTheme(): void {
useEffect(() => {
const root = document.documentElement
- const media = window.matchMedia('(prefers-color-scheme: dark)')
-
- const apply = (): void => {
- const isDark = theme === 'dark' || (theme === 'system' && media.matches)
- root.classList.toggle('dark', isDark)
- }
-
- apply()
-
- if (theme === 'system') {
- media.addEventListener('change', apply)
- return () => media.removeEventListener('change', apply)
- }
- return undefined
+ root.classList.toggle('dark', theme === 'dark')
}, [theme])
}
diff --git a/src/renderer/src/stores/themeStore.ts b/src/renderer/src/stores/themeStore.ts
index 30509b2..ac6e580 100644
--- a/src/renderer/src/stores/themeStore.ts
+++ b/src/renderer/src/stores/themeStore.ts
@@ -1,7 +1,7 @@
import { create } from 'zustand'
import { persist } from 'zustand/middleware'
-export type Theme = 'light' | 'dark' | 'system'
+export type Theme = 'light' | 'dark'
interface ThemeState {
theme: Theme
@@ -11,11 +11,18 @@ interface ThemeState {
export const useThemeStore = create
()(
persist(
(set) => ({
- theme: 'system',
+ theme: 'dark',
setTheme: (theme) => {
set({ theme })
}
}),
- { name: 'aurora-dockside-theme' }
+ {
+ name: 'aurora-dockside-theme',
+ version: 1,
+ migrate: (persisted) => {
+ const previous = persisted as Partial
+ return { ...previous, theme: previous.theme === 'light' ? 'light' : 'dark' } as ThemeState
+ }
+ }
)
)