🪻 distributed transcription service thistle.dunkirk.sh

feat: don't allow access to any pages without auth

dunkirk.sh aa80aece a342a634

verified
Changed files
+3
src
components
+3
src/components/auth.ts
···
if (response.ok) {
this.user = await response.json();
+
} else if (window.location.pathname !== "/") {
+
window.location.href = "/";
}
} finally {
this.loading = false;
···
await fetch("/api/auth/logout", { method: "POST" });
this.user = null;
window.dispatchEvent(new CustomEvent("auth-changed"));
+
window.location.href = "/";
} catch {
// Silent fail
}