Fix 2FA deletion copy

This commit is contained in:
Matej Bačo authored and Torsten Dittmann committed 2024-02-25 21:26:36 +01:00
1 parent 62a5cbc514
commit f196bcfb48
2 files changed
+11 -10

No files matched your search

+6 -2
View File
@@ -39,14 +39,18 @@
</script>
<Modal
title="Delete authentication provider"
title="Delete authentication method"
bind:show={showDelete}
onSubmit={deleteProvider}
icon="exclamation"
state="warning"
bind:error
headerDivider={false}>
<p>Are you sure you want to delete this authentication method from your account?</p>
<p class="u-bold">
Deleting the authentication method will disable multi-factor authentication for your
account. To re-enable it, you'll need to add a new authentication method.
</p>
<p>Enter the 6-digit verification code generated by your authenticator app to continue.</p>
<FormList>
<InputDigits autofocus required bind:value={code} />
</FormList>
@@ -4,8 +4,6 @@
import { Modal } from '$lib/components';
import { Dependencies } from '$lib/constants';
import { Button } from '$lib/elements/forms';
import FormList from '$lib/elements/forms/formList.svelte';
import InputDigits from '$lib/elements/forms/inputDigits.svelte';
import { addNotification } from '$lib/stores/notifications';
import { sdk } from '$lib/stores/sdk';
import { AuthenticatorType } from '@appwrite.io/console';
@@ -13,7 +11,6 @@
export let showDelete = false;
let code: string;
let error: string;
async function deleteProvider() {
@@ -34,23 +31,23 @@
}
$: if (showDelete) {
code = '';
error = '';
}
</script>
<Modal
title="Delete authentication provider"
title="Delete authentication method"
bind:show={showDelete}
onSubmit={deleteProvider}
icon="exclamation"
state="warning"
bind:error
headerDivider={false}>
<p class="u-bold">
Deleting the authentication method will disable multi-factor authentication for this
account. To re-enable it, user will need to add a new authentication method.
</p>
<p>Are you sure you want to delete this authentication method from your account?</p>
<FormList>
<InputDigits autofocus required bind:value={code} />
</FormList>
<svelte:fragment slot="footer">
<Button text on:click={() => (showDelete = false)}>Cancel</Button>