fix: harden silent updater flow and release 0.1.24
This commit is contained in:
@@ -153,7 +153,7 @@ const syncState = reactive({
|
||||
nextRunAt: "",
|
||||
});
|
||||
const updateState = reactive({
|
||||
currentVersion: "0.1.23",
|
||||
currentVersion: "0.1.24",
|
||||
latestVersion: "",
|
||||
available: false,
|
||||
mandatory: false,
|
||||
@@ -1010,7 +1010,18 @@ async function installLatestUpdate(): Promise<boolean> {
|
||||
if (launchResponse.ok && launchResponse.data?.success) {
|
||||
showToast("静默安装已启动,完成后会自动重启客户端", "success");
|
||||
setTimeout(() => {
|
||||
void getCurrentWindow().close();
|
||||
const win = getCurrentWindow();
|
||||
void (async () => {
|
||||
try {
|
||||
await win.close();
|
||||
} catch {
|
||||
try {
|
||||
await win.destroy();
|
||||
} catch {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
})();
|
||||
}, 400);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user