2025-08-18 22:02:17 +00:00
|
|
|
<script lang="ts">
|
|
|
|
|
import type {Profile} from "@welshman/util"
|
2026-01-09 19:02:32 +00:00
|
|
|
import {loginWithNip01} from "@welshman/app"
|
2025-08-18 22:02:17 +00:00
|
|
|
import {preventDefault} from "@lib/html"
|
2025-09-10 22:26:39 +00:00
|
|
|
import AltArrowLeft from "@assets/icons/alt-arrow-left.svg?dataurl"
|
|
|
|
|
import HomeSmile from "@assets/icons/home-smile.svg?dataurl"
|
2025-08-18 22:02:17 +00:00
|
|
|
import Icon from "@lib/components/Icon.svelte"
|
|
|
|
|
import Button from "@lib/components/Button.svelte"
|
|
|
|
|
import ModalHeader from "@lib/components/ModalHeader.svelte"
|
|
|
|
|
import ModalFooter from "@lib/components/ModalFooter.svelte"
|
2025-09-06 00:32:01 +00:00
|
|
|
import {clearModals} from "@app/util/modal"
|
2026-01-09 17:55:10 +00:00
|
|
|
import {initProfile} from "@app/core/commands"
|
2025-08-18 22:02:17 +00:00
|
|
|
|
|
|
|
|
type Props = {
|
|
|
|
|
secret: string
|
|
|
|
|
profile: Profile
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const {secret, profile}: Props = $props()
|
|
|
|
|
|
|
|
|
|
const back = () => history.back()
|
|
|
|
|
|
|
|
|
|
const next = () => {
|
|
|
|
|
loginWithNip01(secret)
|
2026-01-09 17:55:10 +00:00
|
|
|
initProfile(profile)
|
2025-09-06 00:32:01 +00:00
|
|
|
clearModals()
|
2025-08-18 22:02:17 +00:00
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<form class="column gap-4" onsubmit={preventDefault(next)}>
|
|
|
|
|
<ModalHeader>
|
|
|
|
|
{#snippet title()}
|
|
|
|
|
<div>You're all set!</div>
|
|
|
|
|
{/snippet}
|
|
|
|
|
</ModalHeader>
|
|
|
|
|
<p>
|
|
|
|
|
You've created your profile, saved your keys, and now you're ready to start chatting — all
|
|
|
|
|
without asking permission!
|
|
|
|
|
</p>
|
|
|
|
|
<p>
|
|
|
|
|
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!
|
|
|
|
|
</p>
|
|
|
|
|
<ModalFooter>
|
|
|
|
|
<Button class="btn btn-link" onclick={back}>
|
2025-09-10 22:26:39 +00:00
|
|
|
<Icon icon={AltArrowLeft} />
|
2025-08-18 22:02:17 +00:00
|
|
|
Go back
|
|
|
|
|
</Button>
|
|
|
|
|
<Button class="btn btn-primary" type="submit">
|
2025-09-10 22:26:39 +00:00
|
|
|
<Icon icon={HomeSmile} />
|
2025-08-18 22:02:17 +00:00
|
|
|
Go to Dashboard
|
|
|
|
|
</Button>
|
|
|
|
|
</ModalFooter>
|
|
|
|
|
</form>
|