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/components/Lnurlw.svelte | |
| parent | 882c3bd3fd01b6001172c61e0d2227d962254c62 (diff) | |
| download | coinos-ui-78c201d8d9d2f3ec07f6ea36201977846e29ccd9.tar.gz coinos-ui-78c201d8d9d2f3ec07f6ea36201977846e29ccd9.zip | |
homepage design and currency toggling
Diffstat (limited to 'src/components/Lnurlw.svelte')
| -rw-r--r-- | src/components/Lnurlw.svelte | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/components/Lnurlw.svelte b/src/components/Lnurlw.svelte index 5dc980c2..9cf30f0c 100644 --- a/src/components/Lnurlw.svelte +++ b/src/components/Lnurlw.svelte @@ -52,14 +52,15 @@ {#if minWithdrawable === maxWithdrawable} <div class="text-center font-bold text-2xl mb-4"> - <div> - {f(amountFiat, currency)} - </div> - <div> - <span class="text-secondary font-normal text-xl" - >⚡️{`${s(amount)}`}</span - > - </div> + {#if $fiat} + <div>{f(amountFiat, currency)}</div> + {:else} + <div> + <span class="text-secondary font-normal text-xl" + >⚡️{`${s(amount)}`}</span + > + </div> + {/if} </div> {:else} <Numpad bind:amount {currency} {rate} /> @@ -88,7 +89,11 @@ onclick={setMax} disabled={submitting} onkeydown={setMax} - >Max ⚡️{s(Math.floor(maxWithdrawable / 1000))}</button + >{#if $fiat} + Max {f((Math.floor(maxWithdrawable / 1000) * rate) / sats, currency)} + {:else} + Max ⚡️{s(Math.floor(maxWithdrawable / 1000))} + {/if}</button > {/if} |
