fix: Skip Setup button no longer traps users when unauthenticated
The Skip button awaited saveConfigToServer() which fails with 403 when TOTP is required, preventing the wizard from dismissing. Fix: hide wizard FIRST (localStorage-only), then fire server save as fire-and-forget with .catch().
This commit is contained in:
Vendored
+2
-2
File diff suppressed because one or more lines are too long
@@ -252,10 +252,11 @@ window.populateTimezoneSelect = function(selectEl, selectedTz) {
|
|||||||
skipBtn.onclick = async function(e) {
|
skipBtn.onclick = async function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
if (confirm('Skip setup? You can run it later from Settings.')) {
|
if (confirm('Skip setup? You can run it later from Settings.')) {
|
||||||
// Save skip status to server
|
// Save skip status — hide wizard FIRST so it always dismisses,
|
||||||
await saveConfigToServer({ setupComplete: true, skipped: true, timestamp: new Date().toISOString() });
|
// then attempt server save (fire-and-forget, never blocks UI)
|
||||||
safeSet('dashcaddy-setup', 'skipped');
|
safeSet('dashcaddy-setup', 'skipped');
|
||||||
document.getElementById('setup-wizard').style.display = 'none';
|
document.getElementById('setup-wizard').style.display = 'none';
|
||||||
|
saveConfigToServer({ setupComplete: true, skipped: true, timestamp: new Date().toISOString() }).catch(() => {});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user