Add notifications user preferences to the Options view

This commit is contained in:
Bubka 2024-04-26 10:48:26 +02:00
parent 091ac41a08
commit de4e35267d
2 changed files with 16 additions and 0 deletions

View File

@ -161,6 +161,13 @@
<FormCheckbox v-model="user.preferences.showOtpAsDot" @update:model-value="val => savePreference('showOtpAsDot', val)" fieldName="showOtpAsDot" label="settings.forms.show_otp_as_dot.label" help="settings.forms.show_otp_as_dot.help" />
<!-- reveal dotted OTPs -->
<FormCheckbox v-model="user.preferences.revealDottedOTP" @update:model-value="val => savePreference('revealDottedOTP', val)" fieldName="revealDottedOTP" label="settings.forms.reveal_dotted_otp.label" help="settings.forms.reveal_dotted_otp.help" :isDisabled="!user.preferences.showOtpAsDot" :isIndented="true" />
<h4 class="title is-4 pt-4 has-text-grey-light">{{ $t('settings.notifications') }}</h4>
<!-- on new device -->
<FormCheckbox v-model="user.preferences.notifyOnNewAuthDevice" @update:model-value="val => savePreference('notifyOnNewAuthDevice', val)" fieldName="notifyOnNewAuthDevice" label="settings.forms.notify_on_new_auth_device.label" help="settings.forms.notify_on_new_auth_device.help" />
<!-- on failed login -->
<FormCheckbox v-model="user.preferences.notifyOnFailedLogin" @update:model-value="val => savePreference('notifyOnFailedLogin', val)" fieldName="notifyOnFailedLogin" label="settings.forms.notify_on_failed_login.label" help="settings.forms.notify_on_failed_login.help" />
<h4 class="title is-4 pt-4 has-text-grey-light">{{ $t('settings.data_input') }}</h4>
<!-- basic qrcode -->
<FormCheckbox v-model="user.preferences.useBasicQrcodeReader" @update:model-value="val => savePreference('useBasicQrcodeReader', val)" fieldName="useBasicQrcodeReader" label="settings.forms.use_basic_qrcode_reader.label" help="settings.forms.use_basic_qrcode_reader.help" />

View File

@ -29,6 +29,7 @@
'account_linked_to_sso_x_provider' => 'You signed-in via SSO using your :provider account. Your information cannot be changed here but on :provider.',
'general' => 'General',
'security' => 'Security',
'notifications' => 'Notifications',
'profile' => 'Profile',
'change_password' => 'Change password',
'personal_access_tokens' => 'Personal access tokens',
@ -139,6 +140,14 @@
'label' => 'Show Password',
'help' => 'Set how and when <abbr title="One-Time Passwords">OTPs</abbr> are displayed.<br/>',
],
'notify_on_new_auth_device' => [
'label' => 'On new device',
'help' => 'Get an email when a new device connects to your 2FAuth account for the first time'
],
'notify_on_failed_login' => [
'label' => 'On failed login',
'help' => 'Get an email each time an attempt to connect to your 2FAuth account fails'
],
'otp_generation_on_request' => 'After a click/tap',
'otp_generation_on_request_legend' => 'Alone, in its own view',
'otp_generation_on_request_title' => 'Click an account to get a password in a dedicated view',