Rework onboarding flow, add recovery

This commit is contained in:
Jon Staab
2026-01-16 10:06:25 -08:00
parent f3647e9bc1
commit 6aa297c1a4
11 changed files with 92 additions and 93 deletions
+2 -13
View File
@@ -1,6 +1,4 @@
<script lang="ts">
import type {Profile} from "@welshman/util"
import {loginWithNip01} from "@welshman/app"
import {preventDefault} from "@lib/html"
import AltArrowLeft from "@assets/icons/alt-arrow-left.svg?dataurl"
import HomeSmile from "@assets/icons/home-smile.svg?dataurl"
@@ -8,23 +6,14 @@
import Button from "@lib/components/Button.svelte"
import ModalHeader from "@lib/components/ModalHeader.svelte"
import ModalFooter from "@lib/components/ModalFooter.svelte"
import {clearModals} from "@app/util/modal"
import {initProfile} from "@app/core/commands"
type Props = {
secret: string
profile: Profile
next: () => void
}
const {secret, profile}: Props = $props()
const {next}: Props = $props()
const back = () => history.back()
const next = () => {
loginWithNip01(secret)
initProfile(profile)
clearModals()
}
</script>
<form class="column gap-4" onsubmit={preventDefault(next)}>