feat: auto-updater integration
- Install electron-updater - New updater.ts: check/download/install with progress events - IPC: updater:check, updater:download, updater:install, updater:status - Preload bridge for updater API - electron-builder publish config (github provider) - Fix build files path: out -> electron-dist - i18n keys for updater notifications (zh-CN + en)
This commit is contained in:
@@ -120,6 +120,14 @@ const electronAPI = {
|
||||
clearCommandLog: (): Promise<void> =>
|
||||
ipcRenderer.invoke('redis:clearCommandLog'),
|
||||
},
|
||||
updater: {
|
||||
check: (): Promise<any> => ipcRenderer.invoke('updater:check'),
|
||||
download: (): Promise<any> => ipcRenderer.invoke('updater:download'),
|
||||
install: () => ipcRenderer.invoke('updater:install'),
|
||||
onStatus: (callback: (status: any) => void) => {
|
||||
ipcRenderer.on('updater:status', (_e, status) => callback(status))
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
contextBridge.exposeInMainWorld('electronAPI', electronAPI)
|
||||
|
||||
Reference in New Issue
Block a user