diff options
| author | Adam Soltys <[email protected]> | 2024-11-26 13:08:08 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-11-26 13:20:53 -0800 |
| commit | 9b3e117eafbba224b86dd7f8b3c56a0370f72d5b (patch) | |
| tree | a670c3ae954d5075c851126c2aca7a1a45d1b41d /src/components | |
| parent | 2761363d694d3f24600abbe656769f64d7a67605 (diff) | |
| download | coinos-ui-9b3e117eafbba224b86dd7f8b3c56a0370f72d5b.tar.gz coinos-ui-9b3e117eafbba224b86dd7f8b3c56a0370f72d5b.zip | |
bip21 and socket fixes
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/Account.svelte | 24 | ||||
| -rw-r--r-- | src/components/InvoiceActions.svelte | 2 | ||||
| -rw-r--r-- | src/components/InvoiceData.svelte | 2 |
3 files changed, 10 insertions, 18 deletions
diff --git a/src/components/Account.svelte b/src/components/Account.svelte index c378b9a3..4db77066 100644 --- a/src/components/Account.svelte +++ b/src/components/Account.svelte @@ -1,20 +1,13 @@ <script> - import { run } from 'svelte/legacy'; + import { run } from "svelte/legacy"; import { goto } from "$app/navigation"; import Icon from "$comp/Icon.svelte"; import Balance from "$comp/Balance.svelte"; import { t } from "$lib/translations"; - let { - user, - rate, - account, - last - } = $props(); - let { name, seed, balance, id } = $state(account); - - let refresh = (a) => ({ seed, balance, id } = a); + let { user, rate, account, last } = $props(); + let { name, seed, balance, id } = $derived(account); let setAccount = () => (document.cookie = `aid=${id}; path=/; max-age=86400`); let go = () => { @@ -22,9 +15,6 @@ goto("/payments"); }; let type = $derived(seed ? "Savings" : "Cash"); - run(() => { - refresh(account); - }); </script> <div @@ -47,16 +37,18 @@ </div> <div class="flex justify-center w-full text-xl gap-2"> - <a href={`/invoice`} class="contents" onclick={setAccount}> + <a href={"/invoice"} class="contents" onclick={setAccount}> <button class="btn !w-auto flex-grow"> - <iconify-icon icon="ph:hand-coins-bold" width="32" flip="horizontal"></iconify-icon> + <iconify-icon icon="ph:hand-coins-bold" width="32" flip="horizontal" + ></iconify-icon> <div class="my-auto">{$t("user.dashboard.receive")}</div> </button> </a> <a href={`/send`} class="contents grow" onclick={setAccount}> <button type="button" class="btn !w-auto flex-grow"> - <iconify-icon icon="ph:paper-plane-right-bold" width="32"></iconify-icon> + <iconify-icon icon="ph:paper-plane-right-bold" width="32" + ></iconify-icon> <div class="my-auto">{$t("user.dashboard.send")}</div> </button> </a> diff --git a/src/components/InvoiceActions.svelte b/src/components/InvoiceActions.svelte index 0b5dca55..cd66fc36 100644 --- a/src/components/InvoiceActions.svelte +++ b/src/components/InvoiceActions.svelte @@ -35,7 +35,7 @@ </a> {/if} - {#if txt.startsWith("ln")} + {#if txt.length > 120} <div class="w-full flex justify-center gap-2 flex-wrap"> <button class="btn" onclick={() => (showQr = !showQr)}> {#if showQr} diff --git a/src/components/InvoiceData.svelte b/src/components/InvoiceData.svelte index c6721829..b511c599 100644 --- a/src/components/InvoiceData.svelte +++ b/src/components/InvoiceData.svelte @@ -26,7 +26,7 @@ </div> {/if} -{#if !showQr || !txt.startsWith("ln")} +{#if !showQr || txt.length <= 120} <div class="break-all text-center text-secondary text-xl"> {txt} </div> |
