fix(fix-sw): show origin and clarify reset only affects this domain

Displays the actual origin (e.g. https://idaa.org) and adds explicit
copy stating this does not affect other sites, browser history,
passwords, or settings — so users don't panic thinking their entire
browser is being wiped.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Scott Idem
2026-06-24 12:46:10 -04:00
parent a10b4d18bb
commit 826e448af7

View File

@@ -4,6 +4,7 @@ import { onMount } from 'svelte';
let status: string[] = $state([]); let status: string[] = $state([]);
let done = $state(false); let done = $state(false);
let has_error = $state(false); let has_error = $state(false);
const origin = typeof window !== 'undefined' ? window.location.origin : '';
function log(msg: string) { function log(msg: string) {
status = [...status, `${new Date().toLocaleTimeString()} - ${msg}`]; status = [...status, `${new Date().toLocaleTimeString()} - ${msg}`];
@@ -142,12 +143,14 @@ onMount(() => {
<div class="mx-auto max-w-2xl p-8 font-mono"> <div class="mx-auto max-w-2xl p-8 font-mono">
<h1 class="mb-2 text-2xl font-bold text-red-600">Full Storage Reset</h1> <h1 class="mb-2 text-2xl font-bold text-red-600">Full Storage Reset</h1>
<p class="mb-1 text-sm text-gray-600"> <p class="mb-1 text-sm text-gray-700">
Clears <strong>everything</strong> for this domain: service workers, SW cache, IndexedDB, Clears cached data <strong>for this site only</strong>
localStorage, sessionStorage — then reloads. (<span class="font-semibold text-gray-900">{origin}</span>):
service workers, SW cache, IndexedDB, localStorage, and sessionStorage — then reloads.
</p> </p>
<p class="mb-4 text-sm text-gray-500"> <p class="mb-4 text-sm text-gray-500">
Use this if you are completely stuck on an old version of the app and nothing else has This does <strong>not</strong> affect any other sites or your browser history, passwords,
or settings. Use this if you are stuck on an old version of the app and nothing else has
worked. worked.
</p> </p>