diff --git a/src/lib/components/Offline.svelte b/src/lib/components/Offline.svelte deleted file mode 100644 index 0a8a00e..0000000 --- a/src/lib/components/Offline.svelte +++ /dev/null @@ -1,72 +0,0 @@ -
-
- - - -

YOU ARE OFFLINE

-
-

Please check your internet connection.

-

- An internet connection is required to sync your wallet and make - transactions. -

-
- - diff --git a/src/lib/components/PasswordDialog.svelte b/src/lib/components/PasswordDialog.svelte index 95694a3..c69e063 100644 --- a/src/lib/components/PasswordDialog.svelte +++ b/src/lib/components/PasswordDialog.svelte @@ -6,8 +6,7 @@ openWallet, } from "$lib/wallet.svelte"; import { browser } from "$app/environment"; - import { onMount, tick } from "svelte"; - import { fly } from "svelte/transition"; + import { onMount } from "svelte"; let { onunlock }: { onunlock: () => void } = $props(); @@ -15,11 +14,8 @@ let password = $state(""); let error = $state(""); let isValidating = $state(false); - let show = $state(false); - onMount(async () => { - show = true; - await tick(); + onMount(() => { dialogEl?.showModal(); }); @@ -45,50 +41,45 @@ } -{#if show} - -

Unlock Wallet

-

Enter your wallet password to decrypt your seed.

- {#if error} -

- {error} -

- {/if} - +

Unlock Wallet

+

Enter your wallet password to decrypt your seed.

+ {#if error} +

+ {error} +

+ {/if} + { + if (e.key === "Enter" && !isValidating) { + attemptUnlock(); + } + }} + /> +
+ -
-
-{/if} + onclick={() => { + attemptUnlock(); + }}>{isValidating ? "Validating..." : "Unlock"} + + diff --git a/src/lib/components/ToggleSwitch.svelte b/src/lib/components/ToggleSwitch.svelte deleted file mode 100644 index 9d3aa97..0000000 --- a/src/lib/components/ToggleSwitch.svelte +++ /dev/null @@ -1,88 +0,0 @@ - - -
- {label} -