flotilla/src/app/components/BunkerConnect.svelte

26 lines
661 B
Svelte
Raw Normal View History

2025-03-20 19:55:12 +00:00
<script lang="ts">
import Spinner from "@lib/components/Spinner.svelte"
2025-03-20 19:55:12 +00:00
import QRCode from "@app/components/QRCode.svelte"
2026-06-08 21:14:40 +00:00
import type {Nip46Controller} from "@app/nip46"
2025-03-20 19:55:12 +00:00
type Props = {
controller: Nip46Controller
2025-03-20 19:55:12 +00:00
}
const {controller}: Props = $props()
const {url, loading} = controller
2025-03-20 19:55:12 +00:00
</script>
{#if $url}
{#if $loading}
<div class="flex justify-center">
<Spinner loading>Establishing connection...</Spinner>
</div>
{:else}
<div class="flex flex-col items-center gap-2">
<QRCode code={$url} />
<p class="text-sm opacity-75">Scan with your signer to log in, or click to copy.</p>
</div>
{/if}
2025-03-20 19:55:12 +00:00
{/if}