This commit is contained in:
@@ -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 () => {
|
||||
|
||||
Reference in New Issue
Block a user