diff options
| author | Adam Soltys <[email protected]> | 2026-03-03 13:37:47 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-03-03 13:37:47 -0800 |
| commit | 35f15ebc061076709293bbe4e3e2ace78ac79445 (patch) | |
| tree | 19ba2d5b8d6a927372a16a86c55218f81ef4db35 /src/routes/(static) | |
| parent | c6ed33aa9d1d0cdd65aa8d81aa9a05551e975822 (diff) | |
| download | coinos-ui-35f15ebc061076709293bbe4e3e2ace78ac79445.tar.gz coinos-ui-35f15ebc061076709293bbe4e3e2ace78ac79445.zip | |
static landing page with single Start Now button
Prerender the landing page, replace conditional auth header
buttons with a single "Start Now" that checks the username
cookie client-side. Set username cookie httpOnly: false in
all login/register flows.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
Diffstat (limited to 'src/routes/(static)')
| -rw-r--r-- | src/routes/(static)/+layout.svelte | 3 | ||||
| -rw-r--r-- | src/routes/(static)/login/+page.server.ts | 6 | ||||
| -rw-r--r-- | src/routes/(static)/register/auth/+page.server.ts | 2 |
3 files changed, 5 insertions, 6 deletions
diff --git a/src/routes/(static)/+layout.svelte b/src/routes/(static)/+layout.svelte index b204cd0e..f44bfcda 100644 --- a/src/routes/(static)/+layout.svelte +++ b/src/routes/(static)/+layout.svelte @@ -7,7 +7,6 @@ import { page } from "$app/stores"; let { data, children } = $props(); - let user = $derived(data.user); let theme = $state(); $effect(() => { theme = $themeStore; @@ -17,7 +16,7 @@ </script> <SvelteToast options={{ reversed: true, intro: { y: 192 } }} /> -<LandingHeader {user} /> +<LandingHeader /> <Nostr /> <main class="container flex px-4 md:px-40 mx-auto min-h-[600px]" data-theme={theme}> {@render children?.()} diff --git a/src/routes/(static)/login/+page.server.ts b/src/routes/(static)/login/+page.server.ts index 0c493422..480116b5 100644 --- a/src/routes/(static)/login/+page.server.ts +++ b/src/routes/(static)/login/+page.server.ts @@ -88,7 +88,7 @@ export const actions = { const opts = { path: "/", expires }; if (language) cookies.set("lang", language, opts); - cookies.set("username", uname, opts); + cookies.set("username", uname, { ...opts, httpOnly: false }); cookies.set("token", token, opts); return { @@ -137,7 +137,7 @@ export const actions = { const opts = { path: "/", expires }; if (language) cookies.set("lang", language, opts); - cookies.set("username", username, opts); + cookies.set("username", username, { ...opts, httpOnly: false }); cookies.set("token", token, opts); return { @@ -181,7 +181,7 @@ export const actions = { const opts = { path: "/", expires }; if (language) cookies.set("lang", language, opts); - cookies.set("username", username, opts); + cookies.set("username", username, { ...opts, httpOnly: false }); cookies.set("token", token, opts); return { diff --git a/src/routes/(static)/register/auth/+page.server.ts b/src/routes/(static)/register/auth/+page.server.ts index 06735396..29e9a3f8 100644 --- a/src/routes/(static)/register/auth/+page.server.ts +++ b/src/routes/(static)/register/auth/+page.server.ts @@ -88,7 +88,7 @@ export const actions = { expires.setSeconds(expires.getSeconds() + maxAge); const opts = { path: "/", expires }; - cookies.set("username", username, opts); + cookies.set("username", username, { ...opts, httpOnly: false }); cookies.set("token", token, opts); if (sk) { |
