diff options
| author | Adam Soltys <[email protected]> | 2024-11-09 11:28:04 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-11-09 11:28:04 -0800 |
| commit | 542c24b17643bc1a743c6d5eca3e3a29947c72b5 (patch) | |
| tree | 300ecabce7e1b85c1aad64780e8404c3542dfad7 /src/components/Balance.svelte | |
| parent | d47895ec4d54feef1114029ba11188362fa1222d (diff) | |
| download | coinos-ui-542c24b17643bc1a743c6d5eca3e3a29947c72b5.tar.gz coinos-ui-542c24b17643bc1a743c6d5eca3e3a29947c72b5.zip | |
fix 2fa
Diffstat (limited to 'src/components/Balance.svelte')
| -rw-r--r-- | src/components/Balance.svelte | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/components/Balance.svelte b/src/components/Balance.svelte index e5f62d19..f92cd5ef 100644 --- a/src/components/Balance.svelte +++ b/src/components/Balance.svelte @@ -1,9 +1,6 @@ <script> - import { preventDefault } from "svelte/legacy"; - - import Icon from "$comp/Icon.svelte"; import Pin from "$comp/Pin.svelte"; - import { f, s, sat, sats } from "$lib/utils"; + import { f, s, si, sat, sats } from "$lib/utils"; import { pin } from "$lib/store"; import { t } from "$lib/translations"; @@ -23,20 +20,21 @@ <div> {#if user.haspin && !$pin} <button onclick={toggleShow} class="flex gap-2 text-xl"> - <Icon icon="eye-off" style="w-8 my-auto" /> + <iconify-icon icon="ph:eye-slash-bold" width="32"></iconify-icon> <div class="my-auto">{$t("user.showBalance")}</div> </button> {:else} - <div class="text-4xl font-bold tabular-nums"> + <div class="text-4xl font-bold flex items-center"> + <iconify-icon icon="ph:lightning-fill" width="32" class="text-yellow-300"></iconify-icon> + {s(balance)} + </div> + + <div class="text-secondary text-xl"> {#if isNaN(rate)} <div class="text-gray-200">—</div> {:else} - {f((balance * rate) / sats, user.currency)} + {si(((balance * rate) / sats).toFixed(2))} {user.currency} {/if} </div> - - <div class="text-secondary text-xl"> - ⚡️{s(balance)} - </div> {/if} </div> |
