From 2672a8f9224baa579a36f5e2c99756fe041a9fcb Mon Sep 17 00:00:00 2001
From: Jon Staab
On Nostr, you control your own - identity and social data, through the magic of crytography. The basic idea is that you have a - public key, which acts as your user id, and a + identity and social data, through the magic of cryptography. The basic idea is that you have a + public key, which acts as your user ID, and a private key which allows you to prove your identity.
{#if $session?.email} diff --git a/src/app/components/SignUpKey.svelte b/src/app/components/SignUpKey.svelte index 8e55bae9..899d908c 100644 --- a/src/app/components/SignUpKey.svelte +++ b/src/app/components/SignUpKey.svelte @@ -13,6 +13,7 @@ import SignUpComplete from "@app/components/SignUpComplete.svelte" import {pushToast} from "@app/util/toast" import {pushModal} from "@app/util/modal" + import {PLATFORM_NAME} from "@app/core/state" type Props = { profile: Profile @@ -24,7 +25,26 @@ const back = () => history.back() + const cleanupCopy = (copy: string) => + copy + .replace(/\n\s*\n\s*/g, "NEWLINE") + .replace(/\s+/g, " ") + .replace(/NEWLINE/g, "\n\n") + .trim() + const downloadKey = () => { + const sharedCopy = ` + Most online services keep track of users by giving them a username and password. This gives the + service total control over their users, allowing them to ban them at any time, or sell their activity. + + On Nostr, you control your own identity and social data, through the magic of cryptography. The basic + idea is that you have a public key, which acts as your user ID, and a private key which allows you to + prove your identity. + + It's very important to keep your private key safe because it grants permanent and complete access to your + account. + ` + if (usePassword) { if (password.length < 12) { return pushToast({ @@ -34,12 +54,37 @@ } const ncryptsec = encrypt(hexToBytes(secret), password) + const instructions = ` + This file contains a backup of your Nostr secret key, downloaded from ${PLATFORM_NAME} and encrypted using + a password you chose when you signed up. - downloadText("Nostr Secret Key.txt", ncryptsec) + ${sharedCopy} + + Your encrypted private key is: + + ${ncryptsec} + + To use it to log in to other Nostr apps, find a Nostr Signer app (https://nostrapps.com/#signers is a good + place to look), and import your key. + ` + + downloadText("Nostr Secret Key.txt", cleanupCopy(instructions)) } else { const nsec = nsecEncode(hexToBytes(secret)) + const instructions = ` + This file contains a backup of your Nostr secret key, downloaded from ${PLATFORM_NAME}. - downloadText("Nostr Secret Key.txt", nsec) + ${sharedCopy} + + Your private key is: + + ${nsec} + + To use it to log in to other Nostr apps, find a Nostr Signer app (https://nostrapps.com/#signers is a good + place to look), and import your key. + ` + + downloadText("Nostr Secret Key.txt", cleanupCopy(instructions)) } didDownload = true diff --git a/src/app/editor/index.ts b/src/app/editor/index.ts index 11d981b6..8c3e030b 100644 --- a/src/app/editor/index.ts +++ b/src/app/editor/index.ts @@ -79,7 +79,6 @@ export const makeEditor = async ({ new Compressor(file, { maxWidth: 1024, maxHeight: 1024, - convertSize: 2 * 1024 * 1024, success: resolve, error: e => { // Non-images break compressor