diff --git a/src/app/components/ProfileEdit.svelte b/src/app/components/ProfileEdit.svelte index a367cc03..eafc1e61 100644 --- a/src/app/components/ProfileEdit.svelte +++ b/src/app/components/ProfileEdit.svelte @@ -1,5 +1,6 @@ -
-
- -
- - {#snippet label()} -

Username

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

About You

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

Nostr Address

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

- -

- {/snippet} -
-
- - -
-
+ + {#snippet footer()} +
+ + +
+ {/snippet} +
diff --git a/src/app/components/ProfileEditForm.svelte b/src/app/components/ProfileEditForm.svelte new file mode 100644 index 00000000..e1ae0e6a --- /dev/null +++ b/src/app/components/ProfileEditForm.svelte @@ -0,0 +1,79 @@ + + +
+
+ +
+ + {#snippet label()} +

Username

+ {/snippet} + {#snippet input()} + + {/snippet} + {#snippet info()} + What would you like people to call you? + {/snippet} +
+ + {#snippet label()} +

About You

+ {/snippet} + {#snippet input()} + + {/snippet} + {#snippet info()} + Give a brief introduction to why you're here. + {/snippet} +
+ {#if !hideAddress} + + {#snippet label()} +

Nostr Address

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

+ +

+ {/snippet} +
+ {/if} + {@render footer()} +
diff --git a/src/app/components/SignUp.svelte b/src/app/components/SignUp.svelte index 3161adc4..9c1cc76a 100644 --- a/src/app/components/SignUp.svelte +++ b/src/app/components/SignUp.svelte @@ -1,4 +1,5 @@ -
+

Sign up with Nostr

{PLATFORM_NAME} is built using the @@ -89,10 +93,21 @@

Or {/if} - - - Get going on nstart - + {#if Capacitor.isNativePlatform()} + + + + Create an account on Nstart + + {:else} + + + Create an account on Nstart + + {/if}
Already have an account? diff --git a/src/app/components/SignUpKey.svelte b/src/app/components/SignUpKey.svelte new file mode 100644 index 00000000..6e521f6f --- /dev/null +++ b/src/app/components/SignUpKey.svelte @@ -0,0 +1,84 @@ + + + + + {#snippet title()} +
Welcome to Nostr!
+ {/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. +

+

+ This means that instead of using a password to log in, you generate a secret key + which gives you full control over your account. +

+

+ 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} +
+ + + + + diff --git a/src/app/components/SignUpKeyConfirm.svelte b/src/app/components/SignUpKeyConfirm.svelte new file mode 100644 index 00000000..88ff3b04 --- /dev/null +++ b/src/app/components/SignUpKeyConfirm.svelte @@ -0,0 +1,66 @@ + + +
+ + {#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 new file mode 100644 index 00000000..863e5a01 --- /dev/null +++ b/src/app/components/SignUpProfile.svelte @@ -0,0 +1,28 @@ + + + + {#snippet footer()} + + {/snippet} + diff --git a/src/lib/html.ts b/src/lib/html.ts index c1f989a5..d9123606 100644 --- a/src/lib/html.ts +++ b/src/lib/html.ts @@ -76,3 +76,16 @@ export const createScroller = ({ } export const isMobile = "ontouchstart" in document.documentElement + +export const downloadText = (filename: string, text: string) => { + const blob = new Blob([text], {type: "text/plain"}) + const url = URL.createObjectURL(blob) + const a = document.createElement("a") + + a.href = url + a.download = filename + document.body.appendChild(a) + a.click() + document.body.removeChild(a) + URL.revokeObjectURL(url) +}