feat(updater): support portable auto updates

This commit is contained in:
233 authored and GitHub committed 2026-07-22 23:52:14 +08:00
1 parent 39e554369f
commit f7741a55f4
17 files changed
+692 -33

No files matched your search

@@ -19,7 +19,7 @@ export function shouldOpenUpdateDialog(options: { silent?: boolean }) {
}
export function canDownloadAndInstallUpdate(info: api.UpdateInfo | null, isDesktop: boolean) {
return isDesktop && info?.update_available === true && info.portable_mode !== true;
return isDesktop && info?.update_available === true;
}
export function normalizeUpdateDownloadSource(value: unknown): SettingsUpdateDownloadSource {
@@ -169,9 +169,11 @@ export function useAppUpdater(options: UseAppUpdaterOptions = {}) {
async function installPendingUpdate() {
isInstallingUpdate.value = true;
try {
const portableMode = updateInfo.value?.portable_mode === true;
await api.installDownloadedUpdate();
updateDownloaded.value = false;
updateReady.value = true;
// The portable helper exits and relaunches DBX after the invoke response is delivered.
updateReady.value = !portableMode;
} finally {
isInstallingUpdate.value = false;
}