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/Payments.svelte | |
| parent | 882c3bd3fd01b6001172c61e0d2227d962254c62 (diff) | |
| download | coinos-ui-78c201d8d9d2f3ec07f6ea36201977846e29ccd9.tar.gz coinos-ui-78c201d8d9d2f3ec07f6ea36201977846e29ccd9.zip | |
homepage design and currency toggling
Diffstat (limited to 'src/components/Payments.svelte')
| -rw-r--r-- | src/components/Payments.svelte | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/src/components/Payments.svelte b/src/components/Payments.svelte index dd153ec6..16033959 100644 --- a/src/components/Payments.svelte +++ b/src/components/Payments.svelte @@ -5,6 +5,7 @@ import { format } from "date-fns"; import { t } from "$lib/translations"; import locales from "$lib/locales"; + import { fiat } from "$lib/store"; const { fund, locale, user, payments } = $props(); const language = $derived(user?.language || "en"); </script> @@ -24,26 +25,26 @@ > <div class="whitespace-nowrap my-auto col-span-3"> <div class="font-bold flex items-center"> - <div class="flex items-center"> - <iconify-icon - noobserver - icon="ph:lightning-fill" - width="24" - class="text-yellow-300" - ></iconify-icon> - <div>{s(Math.abs(amount), locale)}</div> + <div class="flex items-center gap-1"> + {#if $fiat} + <div>{f(Math.abs(amount) * (p.rate / sats), p.currency, locale)}</div> + {:else} + <iconify-icon + noobserver + icon="ph:lightning-fill" + width="24" + class="text-yellow-300" + ></iconify-icon> + <div>{s(Math.abs(amount), locale)}</div> + {/if} </div> </div> - <div class="text-secondary flex items-center text-base"> - {f(Math.abs(amount) * (p.rate / sats), p.currency, locale)} - - {#if p.tip} - <span class="text-sm text-secondary"> - +{Math.round((p.tip / Math.abs(amount)) * 100)}% - </span> - {/if} - </div> + {#if p.tip} + <div class="text-secondary flex items-center text-sm"> + +{Math.round((p.tip / Math.abs(amount)) * 100)}% + </div> + {/if} </div> <div |
