diff options
| author | Adam Soltys <[email protected]> | 2026-02-27 16:14:25 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-02-27 16:14:25 -0800 |
| commit | 0a1981a48832e4cf8822a523474f67f9dfb2f27f (patch) | |
| tree | f49f22ebb58d103c24c6627ae2382e8f3e401393 /src/routes/(app)/account | |
| parent | 16da2cb00d16f87d02535bfdae815f83f19f251f (diff) | |
| download | coinos-ui-0a1981a48832e4cf8822a523474f67f9dfb2f27f.tar.gz coinos-ui-0a1981a48832e4cf8822a523474f67f9dfb2f27f.zip | |
fix svelte-check issues
Diffstat (limited to 'src/routes/(app)/account')
| -rw-r--r-- | src/routes/(app)/account/[id]/+page.svelte | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/routes/(app)/account/[id]/+page.svelte b/src/routes/(app)/account/[id]/+page.svelte index 439d18be..0f712c7f 100644 --- a/src/routes/(app)/account/[id]/+page.svelte +++ b/src/routes/(app)/account/[id]/+page.svelte @@ -29,8 +29,8 @@ ? $t("accounts.bitcoin") : $t("accounts.custodial"), ); - let name = $state(data.account.name || displayType); - let currency = $state(data.account.currency || data.user.currency); + let name = $state((() => data.account.name || displayType)()); + let currency = $state((() => data.account.currency || data.user.currency)()); let userCurrency = $derived(data.user.currency); let locale = $derived(loc(data.user)); let currencyChanged = $derived(currency !== userCurrency); @@ -40,10 +40,10 @@ updateUserCurrency = currencyChanged; }); - let autowithdraw = $state(data.account.autowithdraw || false); - let threshold = $state(data.account.threshold || data.user.threshold || 1000000); - let reserve = $state(data.account.reserve ?? 0); - let destination = $state(data.account.destination || data.user.destination || ""); + let autowithdraw = $state((() => data.account.autowithdraw || false)()); + let threshold = $state((() => data.account.threshold || data.user.threshold || 1000000)()); + let reserve = $state((() => data.account.reserve ?? 0)()); + let destination = $state((() => data.account.destination || data.user.destination || "")()); let rate = $derived(rates[currency]); let fiats = $derived(Object.keys(rates).sort((a, b) => a.localeCompare(b))); @@ -296,8 +296,14 @@ {/if} {#if showDeleteConfirm} - <div class="fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4" onclick={() => (showDeleteConfirm = false)}> - <div class="bg-base-100 rounded-2xl p-6 max-w-sm w-full space-y-4 text-center" onclick={(e) => e.stopPropagation()}> + <div + class="fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4" + role="button" + tabindex="0" + onclick={() => (showDeleteConfirm = false)} + onkeydown={(e) => e.key === "Escape" && (showDeleteConfirm = false)} + > + <div class="bg-base-100 rounded-2xl p-6 max-w-sm w-full space-y-4 text-center" role="none" onclick={(e) => e.stopPropagation()}> <iconify-icon noobserver icon="ph:warning-bold" width="48" class="text-error"></iconify-icon> <h2 class="text-xl font-semibold">{$t("accounts.deleteAccount")}</h2> <p class="text-secondary">{$t("accounts.deleteConfirm")}</p> |
