From 4f6c08f8a20ddf00d3759fb2e5d26453c470a4db Mon Sep 17 00:00:00 2001 From: Jon Staab Date: Mon, 18 Aug 2025 15:02:17 -0700 Subject: [PATCH] Build better onboarding --- src/app/components/ProfileEditForm.svelte | 61 +++++++---- src/app/components/SignUp.svelte | 39 ++----- src/app/components/SignUpComplete.svelte | 61 +++++++++++ src/app/components/SignUpKey.svelte | 119 ++++++++++++++------- src/app/components/SignUpKeyConfirm.svelte | 65 ----------- src/app/components/SignUpProfile.svelte | 45 ++++---- src/assets/icons/Arrow Down.svg | 3 + src/lib/components/Icon.svelte | 2 + 8 files changed, 219 insertions(+), 176 deletions(-) create mode 100644 src/app/components/SignUpComplete.svelte delete mode 100644 src/app/components/SignUpKeyConfirm.svelte create mode 100644 src/assets/icons/Arrow Down.svg diff --git a/src/app/components/ProfileEditForm.svelte b/src/app/components/ProfileEditForm.svelte index 13288e21..8524bf5b 100644 --- a/src/app/components/ProfileEditForm.svelte +++ b/src/app/components/ProfileEditForm.svelte @@ -18,11 +18,11 @@ type Props = { initialValues: Values onsubmit: (values: Values) => void - hideAddress?: boolean + isSignup?: boolean footer: Snippet } - const {initialValues, hideAddress, onsubmit, footer}: Props = $props() + const {initialValues, isSignup, onsubmit, footer}: Props = $props() const values = $state(initialValues) @@ -32,9 +32,25 @@
-
- -
+ {#if isSignup} +
+
+

Create a Profile

+

+ Give people something to go on — but remember, privacy matters! Be careful about sharing + sensitive information. +

+
+
+ +

Upload an Avatar

+
+
+ {:else} +
+ +
+ {/if} {#snippet label()}

Username

@@ -63,7 +79,7 @@ Give a brief introduction to why you're here. {/snippet}
- {#if !hideAddress} + {#if !isSignup} {#snippet label()}

Nostr Address

@@ -82,19 +98,24 @@ {/snippet}
{/if} - - {#snippet label()} -

Broadcast Profile

- {/snippet} - {#snippet input()} - - {/snippet} - {#snippet info()} -

- If enabled, changes will be published to the broader nostr network in addition to spaces you - are a member of. -

- {/snippet} -
+ {#if !isSignup} + + {#snippet label()} +

Broadcast Profile

+ {/snippet} + {#snippet input()} + + {/snippet} + {#snippet info()} +

+ If enabled, changes will be published to the broader nostr network in addition to spaces + you are a member of. +

+ {/snippet} +
+ {/if} {@render footer()}
diff --git a/src/app/components/SignUp.svelte b/src/app/components/SignUp.svelte index 8c1bf70d..09d98847 100644 --- a/src/app/components/SignUp.svelte +++ b/src/app/components/SignUp.svelte @@ -1,7 +1,6 @@ + +
+ + {#snippet title()} +
You're all set!
+ {/snippet} +
+

+ You've created your profile, saved your keys, and now you're ready to start chatting — all + without asking permission! +

+

+ From your dashboard, you can use invite links, discover community spaces, and keep up-to-date on + groups you've already joined. Click below to get started! +

+ + + + +
diff --git a/src/app/components/SignUpKey.svelte b/src/app/components/SignUpKey.svelte index c153f24d..cc30c027 100644 --- a/src/app/components/SignUpKey.svelte +++ b/src/app/components/SignUpKey.svelte @@ -1,81 +1,118 @@
{#snippet title()} -
Welcome to Nostr!
+
Your Keys are Ready!
{/snippet}

- Nostr is way to build social apps that - talk to each other. Users own their social identity instead of renting it from a tech company, and - can take it with them. + A cryptographic key pair has two parts: your public key identifies your + account, while your private key acts sort of like a master password.

- This means that instead of using a password to log in, you generate a secret key - which gives you full control over your account. + Securing your private key is very important, so make sure to take the time to save your key in a + secure place (like a password manager).

-

- Keeping this key safe is very important, so we encourage you to download an encrypted copy. To - do this, go ahead and fill in the password you'd like to use to secure your key below. -

- - {#snippet label()} - Password* - {/snippet} - {#snippet input()} - - {/snippet} - {#snippet info()} -

Passwords should be at least 12 characters long. Write this down!

- {/snippet} -
+ {#if usePassword} + + {#snippet label()} + Password* + {/snippet} + {#snippet input()} + + {/snippet} + {#snippet info()} +

Passwords should be at least 12 characters long. Write this down!

+ {/snippet} +
+ {/if} +
+ + +
- diff --git a/src/app/components/SignUpKeyConfirm.svelte b/src/app/components/SignUpKeyConfirm.svelte deleted file mode 100644 index ee63d5fc..00000000 --- a/src/app/components/SignUpKeyConfirm.svelte +++ /dev/null @@ -1,65 +0,0 @@ - - - - - {#snippet title()} -
Download your key
- {/snippet} -
-

- Great! We've encrypted your secret key and saved it to your device. If that didn't work, or if - you'd rather save your key somewhere else, you can find the encrypted version below: -

- - {#snippet label()} - Encrypted Secret Key - {/snippet} - {#snippet input()} - - {/snippet} - - - - - -
diff --git a/src/app/components/SignUpProfile.svelte b/src/app/components/SignUpProfile.svelte index 5c3bbe2a..dc349ee4 100644 --- a/src/app/components/SignUpProfile.svelte +++ b/src/app/components/SignUpProfile.svelte @@ -1,33 +1,36 @@ - - {#snippet footer()} - - {/snippet} - +
+ + {#snippet footer()} + + + + + {/snippet} + +
diff --git a/src/assets/icons/Arrow Down.svg b/src/assets/icons/Arrow Down.svg new file mode 100644 index 00000000..b530ebb1 --- /dev/null +++ b/src/assets/icons/Arrow Down.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/lib/components/Icon.svelte b/src/lib/components/Icon.svelte index 704a8727..e4edc4d2 100644 --- a/src/lib/components/Icon.svelte +++ b/src/lib/components/Icon.svelte @@ -9,6 +9,7 @@ import {switcher} from "@welshman/lib" import AddSquare from "@assets/icons/Add Square.svg?dataurl" import ArrowsALogout2 from "@assets/icons/Arrows ALogout 2.svg?dataurl" + import ArrowDown from "@assets/icons/Arrow Down.svg?dataurl" import Bell from "@assets/icons/Bell.svg?dataurl" import Bookmark from "@assets/icons/Bookmark.svg?dataurl" import BillList from "@assets/icons/Bill List.svg?dataurl" @@ -112,6 +113,7 @@ const data = switcher(icon, { "add-square": AddSquare, "arrows-a-logout-2": ArrowsALogout2, + "arrow-down": ArrowDown, bell: Bell, bookmark: Bookmark, "bill-list": BillList,