feat(theme): implement comprehensive theme management system

Add full theme support with light, dark, and system modes, including:
- Theme store using Pinia for state management
- useTheme composable for reactive theme handling
- Theme setting UI in settings page
- Enhanced CSS variable system with Tailwind integration
- IPC communication for theme persistence
- Internationalization support for theme texts
- System theme detection and auto-switching

The implementation follows ClawX's architecture while adapting to Vue 3 and zn-ai's existing infrastructure.
This commit is contained in:
duanshuwen
2026-04-08 23:46:41 +08:00
parent 3ef3392808
commit a8bfbff0e9
12 changed files with 1450 additions and 326 deletions

13
global.d.ts vendored
View File

@@ -40,6 +40,19 @@ declare global {
params: [message: string]
return: void
}
// 主题事件
[IPC_EVENTS.THEME_MODE_UPDATED]: {
params: [isDark: boolean]
return: void
}
[IPC_EVENTS.SET_THEME_MODE]: {
params: [theme: ThemeMode]
return: Promise<boolean> // 返回 isDark
}
[IPC_EVENTS.GET_THEME_MODE]: {
params: []
return: Promise<ThemeMode>
}
}
type TabId = string