aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-12-06 13:56:26 -0800
committerAdam Soltys <[email protected]>2024-12-06 13:56:26 -0800
commit7dc1358f9e87ad6fc9278f55250da8545f35ffab (patch)
tree11f8da0509ebfccb5239af15123dc3fbf2c648b7
parent774c8254d2e6560e52fcb69cd9a70a9ac8b26582 (diff)
downloadcoinos-ui-7dc1358f9e87ad6fc9278f55250da8545f35ffab.tar.gz
coinos-ui-7dc1358f9e87ad6fc9278f55250da8545f35ffab.zip
paste/scan buttons on receive
-rw-r--r--src/components/InvoiceData.svelte4
-rw-r--r--src/components/InvoiceTypes.svelte21
2 files changed, 23 insertions, 2 deletions
diff --git a/src/components/InvoiceData.svelte b/src/components/InvoiceData.svelte
index f9f9068c..4ce39036 100644
--- a/src/components/InvoiceData.svelte
+++ b/src/components/InvoiceData.svelte
@@ -17,11 +17,11 @@
</script>
{#if showQr}
- <div>
+ <div class="max-w-[360px] mx-auto">
<a href={link}>
<img
src={`/qr/${encodeURIComponent(invoice.text)}/raw`}
- class="mx-auto z-10 max-w-[360px] border-4 border-white"
+ class="z-10 border-4 border-white"
alt={txt}
/>
</a>
diff --git a/src/components/InvoiceTypes.svelte b/src/components/InvoiceTypes.svelte
index 25eeed94..872dd1ed 100644
--- a/src/components/InvoiceTypes.svelte
+++ b/src/components/InvoiceTypes.svelte
@@ -1,4 +1,5 @@
<script>
+ import { goto } from "$app/navigation";
let { aid, invoice, user, type, types, t, setType } = $props();
</script>
@@ -52,6 +53,26 @@
<img src="/images/liquid.svg" class="w-8" alt="Liquid" />
<div class="my-auto text-lg">Liquid</div>
</button>
+
+ <button
+ class="btn flex-nowrap"
+ class:bg-base-300={type === types.liquid}
+ class:text-secondary={type === types.liquid}
+ onclick={() => goto("/scan")}
+ >
+ <iconify-icon icon="ph:camera-bold" width="32"></iconify-icon>
+ <div class="my-auto text-lg">{t("user.send.scan")}</div>
+ </button>
+
+ <button
+ class="btn flex-nowrap"
+ class:bg-base-300={type === types.bitcoin}
+ class:text-secondary={type === types.bitcoin}
+ onclick={() => goto("/receive")}
+ >
+ <iconify-icon icon="ph:clipboard-text-bold" width="32"></iconify-icon>
+ <div class="my-auto text-lg">{t("user.send.paste")}</div>
+ </button>
</div>
{#if type === types.liquid}