feat: 提示文案支持通过配置更新

This commit is contained in:
digua
2025-12-20 00:44:59 +08:00
parent 77b7786777
commit 80c5248444
10 changed files with 218 additions and 65 deletions
+1
View File
@@ -88,6 +88,7 @@ interface Api {
getVersion: () => Promise<string>
checkUpdate: () => void
simulateUpdate: () => void
fetchRemoteConfig: (url: string) => Promise<{ success: boolean; data?: unknown; error?: string }>
}
}
+6
View File
@@ -995,6 +995,12 @@ const extendedApi = {
simulateUpdate: (): void => {
ipcRenderer.send('simulate-update')
},
/**
* 获取远程配置(通过主进程请求,绕过 CORS)
*/
fetchRemoteConfig: (url: string): Promise<{ success: boolean; data?: unknown; error?: string }> => {
return ipcRenderer.invoke('app:fetchRemoteConfig', url)
},
},
}