From 288b470656dcbb86bf3fadd45b6f58833d881f3f Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 15 Nov 2024 14:56:26 -0800 Subject: refactor security settings --- src/routes/(app)/settings/security/+page.svelte | 61 ++++++++++++------------- 1 file changed, 29 insertions(+), 32 deletions(-) (limited to 'src/routes/(app)') diff --git a/src/routes/(app)/settings/security/+page.svelte b/src/routes/(app)/settings/security/+page.svelte index 32488d1e..cc988d6c 100644 --- a/src/routes/(app)/settings/security/+page.svelte +++ b/src/routes/(app)/settings/security/+page.svelte @@ -19,11 +19,9 @@ let confirming2fa = $state(), disabling2fa = $state(), importing = $state(), - locked, - mnemonic, + mnemonic = $state(), newNsec = $state(), nsec = $state(), - old, otp = $state(), password = $state(), pin = $state(""), @@ -61,8 +59,6 @@ }; let checkPin = async () => { - old = $current; - try { if (pin.length > 5 && pin === verify) { user.haspin = true; @@ -168,26 +164,30 @@ -
+
- {#if revealPassword} - - {:else} - - {/if} - +
@@ -264,7 +264,7 @@ {/if}
-
+
@@ -274,6 +274,15 @@

+ + - -
{#if importing} @@ -299,13 +299,10 @@ {/if} {#if revealNsec} -
- {nsec} -
+ {/if}
-- cgit v1.2.3