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

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

Unlock Wallet

-

Enter your wallet password to decrypt your seed.

- {#if error} -

- {error} -

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