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}
|
{/if}
|
||||||
{/snippet}
|
{/snippet}
|
||||||
</Tabs>
|
</Tabs>
|
||||||
|
|
||||||
<Button onclick={closeDialog}>Confirm</Button>
|
|
||||||
</div>
|
</div>
|
||||||
</dialog>
|
</dialog>
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { getBreezSDK } from "$lib/breez.svelte";
|
import { getBreezSDK } from "$lib/breez.svelte";
|
||||||
import { getCashuAddress } from "$lib/cashu.svelte";
|
import { getCashuAddress } from "$lib/cashu.svelte";
|
||||||
|
import Button from "$lib/components/Button.svelte";
|
||||||
import QRCode from "qrcode";
|
import QRCode from "qrcode";
|
||||||
|
|
||||||
const { type, alt }: { type: string; alt: string } = $props();
|
const { type, alt }: { type: string; alt: string } = $props();
|
||||||
|
@ -49,6 +50,12 @@
|
||||||
|
|
||||||
{#await paymentText then paymentText}
|
{#await paymentText then paymentText}
|
||||||
<pre class="addr">{paymentText}</pre>
|
<pre class="addr">{paymentText}</pre>
|
||||||
|
<Button
|
||||||
|
class="copy-btn"
|
||||||
|
onclick={() => navigator.clipboard.writeText(paymentText)}
|
||||||
|
>
|
||||||
|
Copy
|
||||||
|
</Button>
|
||||||
{/await}
|
{/await}
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
|
|
@ -22,7 +22,6 @@
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
const breezSDK = await getBreezSDK();
|
const breezSDK = await getBreezSDK();
|
||||||
console.log(breezSDK);
|
|
||||||
const parsed: InputType = await breezSDK.parse(destination);
|
const parsed: InputType = await breezSDK.parse(destination);
|
||||||
if (
|
if (
|
||||||
parsed.type === "bolt11" &&
|
parsed.type === "bolt11" &&
|
||||||
|
|
|
@ -102,6 +102,10 @@
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<svelte:head>
|
||||||
|
<title>Portal BTC</title>
|
||||||
|
</svelte:head>
|
||||||
|
|
||||||
{#if showInstallPrompt && deferredPrompt}
|
{#if showInstallPrompt && deferredPrompt}
|
||||||
<InstallPrompt onInstall={handleInstallClick} />
|
<InstallPrompt onInstall={handleInstallClick} />
|
||||||
{:else if showSplash}
|
{:else if showSplash}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue