mirror of
https://github.com/Bubka/2FAuth.git
synced 2024-11-23 00:33:18 +01:00
Add a 'Remember active group' option
This commit is contained in:
parent
c895e95b87
commit
0989e6e452
@ -40,6 +40,7 @@
|
||||
'showAccountsIcons' => true,
|
||||
'kickUserAfter' => '15',
|
||||
'activeGroup' => 0,
|
||||
'rememberActiveGroup' => true,
|
||||
'defaultGroup' => 0,
|
||||
'useEncryption' => false,
|
||||
'defaultCaptureMode' => 'livescan',
|
||||
|
@ -438,14 +438,16 @@
|
||||
|
||||
this.form.activeGroup = this.$root.appSettings.activeGroup = id
|
||||
|
||||
this.form.post('/api/settings/options', {returnError: true})
|
||||
.then(response => {
|
||||
// everything's fine
|
||||
})
|
||||
.catch(error => {
|
||||
|
||||
this.$router.push({ name: 'genericError', params: { err: error.response } })
|
||||
});
|
||||
if( this.$root.appSettings.rememberActiveGroup ) {
|
||||
this.form.post('/api/settings/options', {returnError: true})
|
||||
.then(response => {
|
||||
// everything's fine
|
||||
})
|
||||
.catch(error => {
|
||||
|
||||
this.$router.push({ name: 'genericError', params: { err: error.response } })
|
||||
});
|
||||
}
|
||||
|
||||
this.closeGroupSwitch()
|
||||
},
|
||||
|
@ -8,8 +8,12 @@
|
||||
<form-toggle :choices="layouts" :form="form" fieldName="displayMode" :label="$t('settings.forms.display_mode.label')" :help="$t('settings.forms.display_mode.help')" />
|
||||
<!-- show icon -->
|
||||
<form-checkbox :form="form" fieldName="showAccountsIcons" :label="$t('settings.forms.show_accounts_icons.label')" :help="$t('settings.forms.show_accounts_icons.help')" />
|
||||
|
||||
<h4 class="title is-4 pt-4">{{ $t('groups.groups') }}</h4>
|
||||
<!-- default group -->
|
||||
<form-select :options="groups" :form="form" fieldName="defaultGroup" :label="$t('settings.forms.default_group.label')" :help="$t('settings.forms.default_group.help')" />
|
||||
<!-- retain active group -->
|
||||
<form-checkbox :form="form" fieldName="rememberActiveGroup" :label="$t('settings.forms.remember_active_group.label')" :help="$t('settings.forms.remember_active_group.help')" />
|
||||
|
||||
<h4 class="title is-4 pt-4">{{ $t('settings.security') }}</h4>
|
||||
<!-- auto lock -->
|
||||
@ -67,6 +71,7 @@
|
||||
defaultGroup: '',
|
||||
useDirectCapture: null,
|
||||
defaultCaptureMode: '',
|
||||
rememberActiveGroup: true,
|
||||
}),
|
||||
langs: [
|
||||
{ text: this.$t('languages.en'), value: 'en' },
|
||||
|
@ -72,6 +72,10 @@
|
||||
'label' => 'Default input mode',
|
||||
'help' => 'Default input mode used when the Direct input option is On',
|
||||
],
|
||||
'remember_active_group' => [
|
||||
'label' => 'Remember group filter',
|
||||
'help' => 'Save the last group filter applied and restore it on your next visit',
|
||||
],
|
||||
'never' => 'Never',
|
||||
'on_token_copy' => 'On security code copy',
|
||||
'1_minutes' => 'After 1 minute',
|
||||
|
Loading…
Reference in New Issue
Block a user