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:
13
global.d.ts
vendored
13
global.d.ts
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user