diff --git a/src/routes/testing/fix-sw/+page.svelte b/src/routes/testing/fix-sw/+page.svelte index 2a988082..0dfe21c7 100644 --- a/src/routes/testing/fix-sw/+page.svelte +++ b/src/routes/testing/fix-sw/+page.svelte @@ -5,7 +5,8 @@ import { RefreshCw } from '@lucide/svelte'; let status: string[] = $state([]); let done = $state(false); let has_error = $state(false); -let countdown = $state(7); +const RELOAD_DELAY_S = 11; +let countdown = $state(RELOAD_DELAY_S); const origin = typeof window !== 'undefined' ? window.location.origin : ''; function log(msg: string) { @@ -130,7 +131,7 @@ async function nuke_everything() { log(`ERROR clearing sessionStorage: ${err.message}`); } - log('─── Reset complete. Reloading in 7 seconds... ───'); + log(`─── Reset complete. Reloading in ${RELOAD_DELAY_S} seconds... ───`); done = true; const tick = setInterval(() => { @@ -138,7 +139,7 @@ async function nuke_everything() { if (countdown <= 0) clearInterval(tick); }, 1000); - await new Promise((r) => setTimeout(r, 7000)); + await new Promise((r) => setTimeout(r, RELOAD_DELAY_S * 1000)); window.location.href = '/'; }