diff options
| author | Adam Soltys <[email protected]> | 2024-11-09 22:51:27 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-11-09 22:51:27 -0800 |
| commit | e0d2cf06e41778e83e23f5c6fe7be02067fd8e66 (patch) | |
| tree | c016551a4e067ec1abb96c7018a908410a54c109 /src/routes | |
| parent | 6d5b2197b1ee1c8c79410e8406f87bfad4013bb1 (diff) | |
| download | coinos-ui-e0d2cf06e41778e83e23f5c6fe7be02067fd8e66.tar.gz coinos-ui-e0d2cf06e41778e83e23f5c6fe7be02067fd8e66.zip | |
settings fix
Diffstat (limited to 'src/routes')
| -rw-r--r-- | src/routes/(app)/settings/security/+page.svelte | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/routes/(app)/settings/security/+page.svelte b/src/routes/(app)/settings/security/+page.svelte index 334d06b7..32488d1e 100644 --- a/src/routes/(app)/settings/security/+page.svelte +++ b/src/routes/(app)/settings/security/+page.svelte @@ -1,5 +1,4 @@ <script> - import { run } from "svelte/legacy"; import { getContext } from "svelte"; import { getMnemonic, getNsec } from "$lib/nostr"; @@ -160,15 +159,10 @@ } }; let verifying = $derived(pin?.length > 5); - run(() => { - verify && checkPin(pin); - }); - run(() => { - enable2fa(token); - }); - run(() => { - disable2fa(token); - }); + + $effect(() => verify && checkPin(pin)); + $effect(() => setting2fa && enable2fa(token)); + $effect(() => disabling2fa && disable2fa(token)); </script> <input type="hidden" name="newpin" value={disablingPin ? "delete" : pin} /> @@ -279,7 +273,7 @@ {$t("user.settings.nostrDescription")} </p> - <div class="flex gap-2"> + <div class="flex flex-wrap sm:flex-nowrap gap-2"> <button type="button" class="btn !w-auto flex-grow" onclick={toggleNsec}> {#if revealNsec} <iconify-icon icon="ph:eye-slash-bold" width="32"></iconify-icon> |
