diff options
| author | Adam Soltys <[email protected]> | 2026-02-04 12:42:42 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-02-11 15:34:19 -0800 |
| commit | 78c201d8d9d2f3ec07f6ea36201977846e29ccd9 (patch) | |
| tree | 413d697c2cfa9d3e867c791e161183bad958ed86 /src/routes/(app)/send/invoice | |
| parent | 882c3bd3fd01b6001172c61e0d2227d962254c62 (diff) | |
| download | coinos-ui-78c201d8d9d2f3ec07f6ea36201977846e29ccd9.tar.gz coinos-ui-78c201d8d9d2f3ec07f6ea36201977846e29ccd9.zip | |
homepage design and currency toggling
Diffstat (limited to 'src/routes/(app)/send/invoice')
| -rw-r--r-- | src/routes/(app)/send/invoice/[id]/+page.svelte | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/src/routes/(app)/send/invoice/[id]/+page.svelte b/src/routes/(app)/send/invoice/[id]/+page.svelte index 187c13c5..9cc2f0a6 100644 --- a/src/routes/(app)/send/invoice/[id]/+page.svelte +++ b/src/routes/(app)/send/invoice/[id]/+page.svelte @@ -5,10 +5,11 @@ import { onDestroy, onMount } from "svelte"; import { t } from "$lib/translations"; import { goto, invalidateAll } from "$app/navigation"; - import { pin } from "$lib/store"; + import { fiat as fiatStore, pin } from "$lib/store"; import { enhance } from "$app/forms"; import Amount from "$comp/Amount.svelte"; - import Avatar from "$comp/Avatar.svelte"; import Numpad from "$comp/Numpad.svelte"; + import Avatar from "$comp/Avatar.svelte"; + import Numpad from "$comp/Numpad.svelte"; import Spinner from "$comp/Spinner.svelte"; import { page } from "$app/stores"; import { @@ -143,12 +144,15 @@ <span class="mr-2">{i.quantity}</span> {i.name} </div> - <div class="font-semibold text-right"> - {f(i.price * i.quantity, invoice.currency)} - </div> - <div class="text-secondary text-right text-lg my-auto"> - {sat(btc(i.price * i.quantity, invoice.rate))} - </div> + {#if $fiatStore} + <div class="font-semibold text-right col-span-2"> + {f(i.price * i.quantity, invoice.currency)} + </div> + {:else} + <div class="text-secondary text-right text-lg my-auto col-span-2"> + {sat(btc(i.price * i.quantity, invoice.rate))} + </div> + {/if} </div> {/each} {/if} @@ -189,7 +193,12 @@ type="button" class="btn !w-auto grow" onclick={setMax} - onkeydown={setMax}>Max ⚡️{s(balance)}</button + onkeydown={setMax} + >{#if $fiatStore} + Max {f((balance * rate) / sats, currency, locale)} + {:else} + Max ⚡️{s(balance)} + {/if}</button > <button |
