Skip to content

Commit

Permalink
Fix 2FA deletion copy
Browse files Browse the repository at this point in the history
  • Loading branch information
Meldiron authored and TorstenDittmann committed Feb 25, 2024
1 parent 62a5cbc commit f196bcf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
8 changes: 6 additions & 2 deletions src/routes/console/account/deleteMfa.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,13 @@
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';
import { user } from './store';
export let showDelete = false;
let code: string;
let error: string;
async function deleteProvider() {
Expand All @@ -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>
Expand Down

0 comments on commit f196bcf

Please sign in to comment.