fix: leave setup wizard after completion
Release / release (push) Canceled after 0s

This commit is contained in:
Qiufeng
2026-08-18 11:38:28 +08:00
parent bb5e63aaf0
commit 10d2e2f0d1
3 changed files with 75 additions and 10 deletions
+8 -9
View File
@@ -378,19 +378,18 @@ function confirmSetup() {
function startCountdown() {
window.clearInterval(countdownTimer);
countdownTimer = window.setInterval(() => {
countdown.value -= 1;
if (countdown.value <= 0) void openLogin();
countdown.value = Math.max(0, countdown.value - 1);
if (countdown.value === 0) openLogin();
}, 1000);
}
async function openLogin() {
function openLogin() {
window.clearInterval(countdownTimer);
completionMessage.value = '系统正在启动,请稍候。';
if (await waitForSetupCompletion()) {
await router.replace('/login');
return;
}
completionMessage.value = '系统启动时间较长,请稍后刷新页面。';
countdown.value = 0;
completionMessage.value = '正在进入登录页。';
// A full navigation clears the setup-mode SPA state retained across the
// service restart. The login route guard performs the final setup check.
window.location.replace('/login');
}
onMounted(async () => {