From 1251d9208caadce626fd0706dfd34ba3e022fb2a Mon Sep 17 00:00:00 2001 From: haoyuren <13851610112@163.com> Date: Tue, 18 Aug 2026 20:30:17 +0800 Subject: Add in-app update check with one-click installer download On launch the home page checks the latest GitHub release; when a newer version exists a bottom-right card offers Download (streams the right installer for the platform into ~/Downloads and opens it), Later, or Skip this version (remembered). Unsigned app rules out silent auto-update on macOS, so installation stays a manual replace. Co-Authored-By: Claude Fable 5 --- src/preload/index.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/preload/index.ts') diff --git a/src/preload/index.ts b/src/preload/index.ts index ee9fd9b..116e8e2 100644 --- a/src/preload/index.ts +++ b/src/preload/index.ts @@ -385,6 +385,21 @@ const api = { }, closeWindow: () => ipcRenderer.invoke('window:close') as Promise, + // Update check (GitHub Releases) + updateCheck: () => + ipcRenderer.invoke('update:check') as Promise<{ + available: boolean + current: string + version?: string + notes?: string + releaseUrl?: string + assetName?: string + assetUrl?: string + assetSize?: number + }>, + updateDownload: (url: string, name: string) => + ipcRenderer.invoke('update:download', url, name) as Promise<{ success: boolean; path?: string; message?: string }>, + // Shell openExternal: (url: string) => ipcRenderer.invoke('shell:openExternal', url), showInFinder: (path: string) => ipcRenderer.invoke('shell:showInFinder', path), -- cgit v1.2.3