From 1dafc13192c80363934327ecfbb47d7354d26509 Mon Sep 17 00:00:00 2001 From: "@s.roertgen" Date: Tue, 29 Apr 2025 21:26:02 +0200 Subject: [PATCH] login without extension and stuff --- src/lib/stores.js | 4 ++- src/routes/+page.svelte | 64 +++++++++++++++++++++++++++-------------- 2 files changed, 46 insertions(+), 22 deletions(-) diff --git a/src/lib/stores.js b/src/lib/stores.js index da7078a..e9bda45 100644 --- a/src/lib/stores.js +++ b/src/lib/stores.js @@ -22,4 +22,6 @@ export async function initializeNDK() { ndk.set(ndkInstance); return ndkInstance; -} \ No newline at end of file +} + +export const user = writable(null); \ No newline at end of file diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index a60ac6b..fb47cfe 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,16 +1,15 @@
- - {#if !questionId} + {#if !$user} + + {/if} + + {#if !$questionId}

Join a session!

{#if $connected} @@ -77,7 +102,8 @@

Ask a Question

{#if $connected} - {#if !questionId} + {#key $questionId} + {#if $questionId === ''}
- {/if} - - {#if questionId} + {:else}

Share Your Question

- QR Code + QR Code

Share this QR code or link:

- {`/q/`}{questionShortId} + {`/q/`}{questionShortId}

{questionShortId}

@@ -113,8 +137,7 @@

Users can now vote on the question.

{/if} - {:else} -

Connecting to Nostr relay...

+ {/key} {/if}
@@ -133,7 +156,6 @@ .qr-share img { width: 100%; border: 3px solid #eee; - aspect-ratio: 4 / 3; } .main-layout { margin: auto;