just let guests in for now

This commit is contained in:
2026-04-02 03:19:31 -04:00
parent 5413d62528
commit d3729b65a4
2 changed files with 47 additions and 10 deletions
+26 -1
View File
@@ -182,12 +182,18 @@ body {
border: none;
color: var(--text-muted);
cursor: pointer;
font-size: 1.2rem;
font-size: 0.9rem;
line-height: 1;
padding: 0;
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
transition: opacity 0.1s;
}
.section-header:hover .add-btn {
opacity: 1;
}
.add-btn:hover {
@@ -1201,6 +1207,25 @@ body {
cursor: not-allowed;
}
.btn-secondary {
background-color: transparent;
border: 1px solid var(--brand);
color: var(--brand);
padding: 8px 16px;
border-radius: 4px;
cursor: pointer;
font-weight: 600;
transition: background-color 0.2s, color 0.2s;
display: flex;
align-items: center;
justify-content: center;
}
.btn-secondary:hover {
background-color: var(--brand);
color: white;
}
/* Login Screen */
.login-screen {
display: flex;
+21 -9
View File
@@ -7,6 +7,7 @@
let authError = $state<string | null>(null);
let hasStoredToken = $state(false);
let isGuest = $state(false);
onMount(() => {
hasStoredToken = !!localStorage.getItem(TOKEN_KEY);
@@ -20,12 +21,13 @@
import.meta.env.VITE_BYPASS_AUTH === "true" ||
new URLSearchParams(window.location.search).has("bypass_auth");
const isAuthenticated = $derived(auth.isAuthenticated || hasStoredToken || isBypassEnabled);
const isAuthenticated = $derived(auth.isAuthenticated || hasStoredToken || isGuest || isBypassEnabled);
$effect(() => {
console.log("AuthGate: auth.isLoading:", auth.isLoading);
console.log("AuthGate: auth.isAuthenticated:", auth.isAuthenticated);
console.log("AuthGate: hasStoredToken:", hasStoredToken);
console.log("AuthGate: isGuest:", isGuest);
console.log("AuthGate: isBypassEnabled:", isBypassEnabled);
});
</script>
@@ -45,14 +47,24 @@
<div class="login-error">{authError}</div>
{/if}
<button
onclick={() => auth.signinRedirect()}
disabled={auth.isLoading}
class="btn-primary"
style="width: 100%"
>
{auth.isLoading ? "Loading..." : "Login with OIDC"}
</button>
<div style="display: flex; flex-direction: column; gap: 12px; width: 100%">
<button
onclick={() => auth.signinRedirect()}
disabled={auth.isLoading}
class="btn-primary"
style="width: 100%"
>
{auth.isLoading ? "Loading..." : "Login with OIDC"}
</button>
<button
onclick={() => isGuest = true}
class="btn-secondary"
style="width: 100%"
>
Continue as a guest
</button>
</div>
</div>
</div>
{/if}