feat: add copy buttons in receive dialog
This commit is contained in:
parent
18a5227033
commit
4d943c040a
4 changed files with 11 additions and 3 deletions
|
@ -44,8 +44,6 @@
|
|||
{/if}
|
||||
{/snippet}
|
||||
</Tabs>
|
||||
|
||||
<Button onclick={closeDialog}>Confirm</Button>
|
||||
</div>
|
||||
</dialog>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
}
|
||||
try {
|
||||
const breezSDK = await getBreezSDK();
|
||||
console.log(breezSDK);
|
||||
const parsed: InputType = await breezSDK.parse(destination);
|
||||
if (
|
||||
parsed.type === "bolt11" &&
|
||||
|
|
|
@ -102,6 +102,10 @@
|
|||
});
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>Portal BTC</title>
|
||||
</svelte:head>
|
||||
|
||||
{#if showInstallPrompt && deferredPrompt}
|
||||
<InstallPrompt onInstall={handleInstallClick} />
|
||||
{:else if showSplash}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue