feat(update): implement auto-update functionality with electron-updater

- Add AppUpdater module with update lifecycle management
- Create UpdateSettings UI component with progress display
- Add Progress UI component based on Radix UI
- Create update Zustand store for state management
- Register update IPC handlers in main process
- Auto-check for updates on production startup
- Add commit documentation for commits 2-6
This commit is contained in:
Haze
2026-02-05 23:36:12 +08:00
Unverified
parent 98a2d9bc83
commit e02cf05baf
13 changed files with 1313 additions and 50 deletions

View File

@@ -43,10 +43,13 @@ const electronAPI = {
'settings:getAll',
'settings:reset',
// Update
'update:status',
'update:version',
'update:check',
'update:download',
'update:install',
'update:getStatus',
'update:setChannel',
'update:setAutoDownload',
// Env
'env:getConfig',
'env:setApiKey',
@@ -93,9 +96,13 @@ const electronAPI = {
'gateway:exit',
'gateway:error',
'navigate',
'update:status-changed',
'update:checking',
'update:available',
'update:not-available',
'update:progress',
'update:downloaded',
'update:status',
'update:error',
'cron:updated',
];
@@ -128,9 +135,13 @@ const electronAPI = {
'gateway:exit',
'gateway:error',
'navigate',
'update:status-changed',
'update:checking',
'update:available',
'update:not-available',
'update:progress',
'update:downloaded',
'update:status',
'update:error',
];
if (validChannels.includes(channel)) {