aboutsummaryrefslogtreecommitdiffstats
path: root/src/components
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2025-11-26 10:56:00 -0800
committerAdam Soltys <[email protected]>2026-02-11 15:33:08 -0800
commit5f1c31b6618f0b895fb98c8f2a841989625eaf16 (patch)
tree668a3cddaacbb03a1f3b5fdcf8700e49674dada0 /src/components
parent21023052918c0b787916ef78937e0be41f46142a (diff)
downloadcoinos-ui-5f1c31b6618f0b895fb98c8f2a841989625eaf16.tar.gz
coinos-ui-5f1c31b6618f0b895fb98c8f2a841989625eaf16.zip
ark
Diffstat (limited to 'src/components')
-rw-r--r--src/components/InvoiceActions.svelte79
-rw-r--r--src/components/InvoiceData.svelte2
2 files changed, 52 insertions, 29 deletions
diff --git a/src/components/InvoiceActions.svelte b/src/components/InvoiceActions.svelte
index e2a31ab8..08f9920d 100644
--- a/src/components/InvoiceActions.svelte
+++ b/src/components/InvoiceActions.svelte
@@ -91,7 +91,7 @@
</button>
</div>
- {#if txt.length > 120}
+ {#if txt?.length > 120}
<div class="w-full flex justify-center gap-2 flex-wrap">
<button class="btn" onclick={() => (showQr = !showQr)}>
{#if showQr}
@@ -109,29 +109,51 @@
{/if}
<div class="flex gap-2">
- <button
- class="btn flex-nowrap !w-auto grow"
- class:bg-base-300={type === types.lightning}
- class:text-secondary={type === types.lightning}
- onclick={() => {
- $amountPrompt = false;
- newAmount = undefined;
- setType(types.lightning);
- }}
- >
- <div
- class="bg-black rounded-full w-8 h-8 items-center justify-center flex"
+ {#if aid === user.id}
+ <button
+ class="btn flex-nowrap !w-auto grow"
+ class:bg-base-300={type === types.lightning}
+ class:text-secondary={type === types.lightning}
+ onclick={() => {
+ $amountPrompt = false;
+ newAmount = undefined;
+ setType(types.lightning);
+ }}
>
- <div class="m-auto">
- <iconify-icon
- noobserver
- icon="ph:lightning-fill"
- class="text-yellow-300 text-2xl"
- ></iconify-icon>
+ <div
+ class="bg-black rounded-full w-8 h-8 items-center justify-center flex"
+ >
+ <div class="m-auto">
+ <iconify-icon
+ noobserver
+ icon="ph:lightning-fill"
+ class="text-yellow-300 text-2xl"
+ ></iconify-icon>
+ </div>
</div>
- </div>
- <div class="my-auto text-lg">Lightning</div>
- </button>
+ <div class="my-auto text-lg">Lightning</div>
+ </button>
+ {:else}
+ <button
+ class="btn flex-nowrap !w-auto grow"
+ class:bg-base-300={type === types.ark}
+ class:text-secondary={type === types.ark}
+ onclick={() => {
+ $amountPrompt = false;
+ newAmount = undefined;
+ setType(types.ark);
+ }}
+ >
+ <div
+ class="bg-black rounded-full w-8 h-8 items-center justify-center flex"
+ >
+ <div class="m-auto">
+ <img src="/images/ark.png" class="w-8 h-8 rounded-full object-cover" alt="Bitcoin" />
+ </div>
+ </div>
+ <div class="my-auto text-lg">Ark</div>
+ </button>
+ {/if}
<button
class="btn flex-nowrap !w-auto grow"
@@ -144,10 +166,11 @@
</button>
</div>
-
- <button type="button" class="btn" onclick={toggleType}>
- <img src="/images/liquid.svg" class="w-8" alt="Liquid" />
- <img src="/images/cash.png" class="w-8 my-auto" />
- <div class="my-auto">{t("payments.moreOptions")}</div>
- </button>
+ {#if aid === user.id}
+ <button type="button" class="btn" onclick={toggleType}>
+ <img src="/images/liquid.svg" class="w-8" alt="Liquid" />
+ <img src="/images/cash.png" class="w-8 my-auto" />
+ <div class="my-auto">{t("payments.moreOptions")}</div>
+ </button>
+ {/if}
</div>
diff --git a/src/components/InvoiceData.svelte b/src/components/InvoiceData.svelte
index 8edc9257..e08916fe 100644
--- a/src/components/InvoiceData.svelte
+++ b/src/components/InvoiceData.svelte
@@ -53,7 +53,7 @@
</div>
{/if}
-{#if !showQr || txt.length <= 120}
+{#if !showQr || txt?.length <= 120}
<div
class="break-all text-center text-secondary text-xl flex gap-1 items-center justify-center"
>