fix: harden silent updater flow and release 0.1.24

This commit is contained in:
2026-02-20 20:34:02 +08:00
parent 01384a2215
commit fe544efc91
7 changed files with 67 additions and 10 deletions

View File

@@ -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;
}