diff --git a/src/store/themeStore.ts b/src/store/themeStore.ts index 8fd4598d..4a1fa963 100644 --- a/src/store/themeStore.ts +++ b/src/store/themeStore.ts @@ -44,6 +44,23 @@ export function getScheduledTheme(state: Pick = { + 'amber-night': 'obsidian-gold', // warm gold/amber dark family + 'ice-blue': 'carbon-grey', // cool neutral dark (no surviving cyan) + 'monochrome': 'carbon-grey', // neutral grey dark + 'phosphor-green': 'deep-forest', // green dark family + 'rose-dark': 'sakura-night', // pink/rose dark family +}; + +function remapTheme(value: unknown): unknown { + return typeof value === 'string' && value in REMOVED_THEME_REMAP + ? REMOVED_THEME_REMAP[value] + : value; +} + export const useThemeStore = create()( persist( (set) => ({ @@ -74,6 +91,17 @@ export const useThemeStore = create()( }), { name: 'psysonic_theme', + version: 1, + migrate: (persistedState, _version) => { + if (!persistedState || typeof persistedState !== 'object') return persistedState; + const s = persistedState as Record; + return { + ...s, + theme: remapTheme(s.theme), + themeDay: remapTheme(s.themeDay), + themeNight: remapTheme(s.themeNight), + }; + }, } ) );