Support Aegis URL scheme for NIP-46 login
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
<script lang="ts">
|
||||
import {Capacitor} from "@capacitor/core"
|
||||
import Button from "@lib/components/Button.svelte"
|
||||
import Spinner from "@lib/components/Spinner.svelte"
|
||||
import QRCode from "@app/components/QRCode.svelte"
|
||||
import type {Nip46Controller} from "@app/util/nip46"
|
||||
@@ -9,6 +11,14 @@
|
||||
|
||||
const {controller}: Props = $props()
|
||||
const {url, loading} = controller
|
||||
|
||||
const openAegis = () => {
|
||||
controller.launchSigner("aegis")
|
||||
}
|
||||
|
||||
const openNostrSigner = () => {
|
||||
controller.launchSigner("nostrsigner")
|
||||
}
|
||||
</script>
|
||||
|
||||
{#if $url}
|
||||
@@ -20,6 +30,12 @@
|
||||
<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>
|
||||
{#if Capacitor.isNativePlatform()}
|
||||
<div class="flex w-full flex-col gap-2">
|
||||
<Button class="btn btn-primary" onclick={openAegis}>Open in Aegis</Button>
|
||||
<Button class="btn" onclick={openNostrSigner}>Open in Nostr Signer</Button>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user