feat(phase1): architecture skeleton

- Electron 33 main process with frameless window, IPC, win-state persistence
- Preload with contextBridge typed API (window, theme, dialog)
- Vue 3 + Pinia + Element Plus + Vue Router renderer
- Dark/light dual theme via CSS custom properties
- TitleBar with window controls + theme toggle
- StatusBar placeholder
- Design spec document
This commit is contained in:
2026-07-04 17:21:00 +08:00
parent 3e06def637
commit 7e5d61c099
20 changed files with 8338 additions and 2 deletions
+23
View File
@@ -0,0 +1,23 @@
// src/preload/index.d.ts
export interface ElectronAPI {
window: {
minimize: () => void
maximize: () => void
close: () => void
}
theme: {
get: () => Promise<boolean>
set: (theme: 'system' | 'dark' | 'light') => void
onOsUpdated: (callback: (isDark: boolean) => void) => void
}
dialog: {
openFile: (options: { title?: string; filters?: { name: string; extensions: string[] }[] }) =>
Promise<{ path: string; content: string } | null>
}
}
declare global {
interface Window {
electronAPI: ElectronAPI
}
}