feat: add auto-update functionality with settings UI

- Implement electron-updater integration with IPC handlers for update operations
- Add Pinia store for managing update state and user preferences
- Create settings UI with version display, update controls, and auto-update toggles
- Update IPC constants and preload API for update-related communication
- Refactor preload invoke methods to use async IPC consistently
- Add rounded corners to settings page layout for better visual consistency
This commit is contained in:
DEV_DSW
2026-04-09 15:15:23 +08:00
parent a8bfbff0e9
commit 1aa28a7808
10 changed files with 411 additions and 96 deletions

View File

@@ -58,6 +58,13 @@ export enum IPC_EVENTS {
// 打开渠道
OPEN_CHANNEL = 'open-channel',
// 更新
UPDATE_CHECK = 'update:check',
UPDATE_DOWNLOAD = 'update:download',
UPDATE_INSTALL = 'update:install',
UPDATE_VERSION = 'update:version',
UPDATE_STATUS_CHANGED = 'update:status-changed',
}
export const MAIN_WIN_SIZE = {
@@ -82,6 +89,8 @@ export enum CONFIG_KEYS {
MINIMIZE_TO_TRAY = 'minimizeToTray',
PROVIDER = 'provider',
DEFAULT_MODEL = 'defaultModel',
AUTO_CHECK_UPDATE = 'autoCheckUpdate',
AUTO_DOWNLOAD_UPDATE = 'autoDownloadUpdate',
}
export enum MENU_IDS {