feat: enhance superuser creation with email verification and update settings for two-factor authentication
This commit is contained in:
@@ -307,6 +307,7 @@
|
||||
"settings_page": "Settings Page",
|
||||
"account_settings": "User Account Settings",
|
||||
"update": "Update",
|
||||
"no_verified_email_warning": "You must have a verified email address to enable two-factor authentication.",
|
||||
"password_change": "Change Password",
|
||||
"new_password": "New Password",
|
||||
"confirm_new_password": "Confirm New Password",
|
||||
|
||||
@@ -416,9 +416,15 @@
|
||||
<div class="bg-neutral p-6 rounded-lg shadow-md text-center">
|
||||
{#if !data.props.authenticators}
|
||||
<p class="text-neutral-content">{$t('settings.mfa_not_enabled')}</p>
|
||||
<button class="btn btn-primary mt-4" on:click={() => (isMFAModalOpen = true)}
|
||||
>{$t('settings.enable_mfa')}</button
|
||||
>
|
||||
{#if !emails.some((e) => e.verified)}
|
||||
<div class="alert alert-warning mt-4">
|
||||
{$t('settings.no_verified_email_warning')}
|
||||
</div>
|
||||
{:else}
|
||||
<button class="btn btn-primary mt-4" on:click={() => (isMFAModalOpen = true)}
|
||||
>{$t('settings.enable_mfa')}</button
|
||||
>
|
||||
{/if}
|
||||
{:else}
|
||||
<button class="btn btn-warning mt-4" on:click={disableMfa}
|
||||
>{$t('settings.disable_mfa')}</button
|
||||
|
||||
Reference in New Issue
Block a user