mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-08-02 19:55:18 +02:00
feat: enhance superuser creation with email verification and update settings for two-factor authentication
This commit is contained in:
parent
548702890d
commit
f670fbc93a
4 changed files with 35 additions and 9 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue