feat(updater): support portable auto updates
This commit is contained in:
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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user