flotilla/src/app/components/InfoKeys.svelte

54 lines
2 KiB
Svelte
Raw Normal View History

2024-10-14 19:35:08 +00:00
<script lang="ts">
2024-11-27 00:39:49 +00:00
import {session} from "@welshman/app"
2024-10-14 19:35:08 +00:00
import Link from "@lib/components/Link.svelte"
2024-11-27 00:39:49 +00:00
import Icon from "@lib/components/Icon.svelte"
2024-10-14 19:35:08 +00:00
import Button from "@lib/components/Button.svelte"
import ModalHeader from "@lib/components/ModalHeader.svelte"
2024-11-27 00:39:49 +00:00
import ModalFooter from "@lib/components/ModalFooter.svelte"
import ProfileEject from "@app/components/ProfileEject.svelte"
2024-10-22 18:04:40 +00:00
import {PLATFORM_NAME} from "@app/state"
2024-11-27 00:39:49 +00:00
import {pushModal} from "@app/modal"
const back = () => history.back()
const startEject = () => pushModal(ProfileEject)
2024-10-14 19:35:08 +00:00
</script>
<div class="column gap-4">
<ModalHeader>
2025-02-04 00:37:14 +00:00
{#snippet title()}
<div>What is a private key?</div>
{/snippet}
2024-10-14 19:35:08 +00:00
</ModalHeader>
<p>
2024-11-27 00:39:49 +00:00
Most online services keep track of users by giving them a username and password. This gives the
service <strong>total control</strong> over their users, allowing them to ban them at any time, or
sell their activity.
2024-10-14 19:35:08 +00:00
</p>
<p>
2024-10-15 19:02:11 +00:00
On <Link external href="https://nostr.com/">Nostr</Link>, <strong>you</strong> control your own
identity and social data, through the magic of crytography. The basic idea is that you have a
2024-11-27 00:39:49 +00:00
<strong>public key</strong>, which acts as your user id, and a
<strong>private key</strong> which allows you to prove your identity.
2024-10-14 19:35:08 +00:00
</p>
2024-11-27 00:39:49 +00:00
{#if $session?.email}
<p>
It's very important to keep private keys safe, but this can sometimes be tricky, which is why {PLATFORM_NAME}
supports a traditional account-based login for new users.
</p>
<p>If you'd like to switch to self-custody, please click below to get started.</p>
<ModalFooter>
<Button class="btn btn-link" on:click={back}>
<Icon icon="alt-arrow-left" />
Go back
</Button>
<Button class="btn btn-primary" on:click={startEject}>
<Icon icon="check-circle" />
I want to hold my own keys
</Button>
</ModalFooter>
{:else}
<Button class="btn btn-primary" on:click={back}>Got it</Button>
{/if}
2024-10-14 19:35:08 +00:00
</div>