diff options
| author | Adam Soltys <[email protected]> | 2024-11-07 21:16:25 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-11-08 09:27:40 -0800 |
| commit | 32fcc461cd43c8907df5e306d520bb671307eab1 (patch) | |
| tree | 0253780c569998b6c1a5f43026586e94916c3fee /src/routes/(app)/account/pass | |
| parent | be5aa52cea1d57c875cfb22d25c6a866b8de2239 (diff) | |
| download | coinos-ui-32fcc461cd43c8907df5e306d520bb671307eab1.tar.gz coinos-ui-32fcc461cd43c8907df5e306d520bb671307eab1.zip | |
svelte 5
Diffstat (limited to 'src/routes/(app)/account/pass')
| -rw-r--r-- | src/routes/(app)/account/pass/+page.svelte | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/routes/(app)/account/pass/+page.svelte b/src/routes/(app)/account/pass/+page.svelte index 5becf337..62ef9b8e 100644 --- a/src/routes/(app)/account/pass/+page.svelte +++ b/src/routes/(app)/account/pass/+page.svelte @@ -1,4 +1,6 @@ <script lang="ts"> + import { preventDefault } from 'svelte/legacy'; + import { tick, onMount } from "svelte"; import { t } from "$lib/translations"; import { mnemonic } from "$lib/store"; @@ -15,12 +17,12 @@ import { goto } from "$app/navigation"; import { HDKey } from "@scure/bip32"; - export let data; + let { data } = $props(); let { user } = data; - let submitting; + let submitting = $state(); - let confirm, password, revealPassword, revealConfirm; + let confirm = $state(), password = $state(), revealPassword = $state(), revealConfirm = $state(); let type = "bitcoin"; let name = $t("accounts.savings"); @@ -70,7 +72,7 @@ </div> <form - on:submit|preventDefault={submit} + onsubmit={preventDefault(submit)} class="container w-full mx-auto text-lg px-4 max-w-xl space-y-5" > <p class="text-secondary mb-1"> @@ -100,7 +102,7 @@ <button tabindex="-1" type="button" - on:click={() => (revealPassword = !revealPassword)} + onclick={() => (revealPassword = !revealPassword)} class="absolute right-5 -translate-y-1/2 top-1/2" > <Icon icon={revealPassword ? "eye" : "eye-off"} /> @@ -129,7 +131,7 @@ <button type="button" tabindex="-1" - on:click={() => (revealConfirm = !revealConfirm)} + onclick={() => (revealConfirm = !revealConfirm)} class="absolute right-5 -translate-y-1/2 top-1/2" > <Icon icon={revealConfirm ? "eye" : "eye-off"} /> |
