feat: add copy buttons in receive dialog

This commit is contained in:
Danny Morabito 2025-07-07 20:47:45 +02:00
parent 18a5227033
commit 4d943c040a
Signed by: dannym
GPG key ID: 7CC8056A5A04557E
4 changed files with 11 additions and 3 deletions

View file

@ -44,8 +44,6 @@
{/if}
{/snippet}
</Tabs>
<Button onclick={closeDialog}>Confirm</Button>
</div>
</dialog>

View file

@ -1,6 +1,7 @@
<script lang="ts">
import { getBreezSDK } from "$lib/breez.svelte";
import { getCashuAddress } from "$lib/cashu.svelte";
import Button from "$lib/components/Button.svelte";
import QRCode from "qrcode";
const { type, alt }: { type: string; alt: string } = $props();
@ -49,6 +50,12 @@
{#await paymentText then paymentText}
<pre class="addr">{paymentText}</pre>
<Button
class="copy-btn"
onclick={() => navigator.clipboard.writeText(paymentText)}
>
Copy
</Button>
{/await}
<style>

View file

@ -22,7 +22,6 @@
}
try {
const breezSDK = await getBreezSDK();
console.log(breezSDK);
const parsed: InputType = await breezSDK.parse(destination);
if (
parsed.type === "bolt11" &&

View file

@ -102,6 +102,10 @@
});
</script>
<svelte:head>
<title>Portal BTC</title>
</svelte:head>
{#if showInstallPrompt && deferredPrompt}
<InstallPrompt onInstall={handleInstallClick} />
{:else if showSplash}