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 | |
| parent | d47895ec4d54feef1114029ba11188362fa1222d (diff) | |
| download | coinos-ui-542c24b17643bc1a743c6d5eca3e3a29947c72b5.tar.gz coinos-ui-542c24b17643bc1a743c6d5eca3e3a29947c72b5.zip | |
fix 2fa
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/Balance.svelte | 20 | ||||
| -rw-r--r-- | src/components/Pinpad.svelte | 13 |
2 files changed, 17 insertions, 16 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> diff --git a/src/components/Pinpad.svelte b/src/components/Pinpad.svelte index 93f31d08..72aaac81 100644 --- a/src/components/Pinpad.svelte +++ b/src/components/Pinpad.svelte @@ -1,5 +1,5 @@ <script> - import { preventDefault, stopPropagation } from 'svelte/legacy'; + import { preventDefault, stopPropagation } from "svelte/legacy"; import Left from "$comp/Left.svelte"; import Icon from "$comp/Icon.svelte"; @@ -64,7 +64,7 @@ width="32" onclick={stopPropagation(preventDefault(() => (hide = !hide)))} class="cursor-pointer" -></iconify-icon> + ></iconify-icon> </label> <div class="grid grid-cols-3 gap-2 w-[300px] mx-auto grayscale"> @@ -73,7 +73,9 @@ <button type="button" class="btn" - onclick={stopPropagation(preventDefault(() => handleInput(value)))} + onclick={((e) => e.preventDefault(), + e.stopPropagation(), + handleInput(value))} > <Left /> </button> @@ -81,8 +83,9 @@ <button type="button" class="btn" - onclick={stopPropagation(preventDefault(() => handleInput(value)))} - >{value}</button + onclick={((e) => e.preventDefault(), + e.stopPropagation(), + handleInput(value))}>{value}</button > {/if} {/each} |
