Add option to show/hide icons in accounts list view

This commit is contained in:
Bubka 2020-10-03 19:29:14 +02:00
parent 6cc297f65a
commit ddeab18df3
5 changed files with 12 additions and 3 deletions

View File

@ -37,6 +37,7 @@
'closeTokenOnCopy' => false,
'useBasicQrcodeReader' => false,
'displayMode' => 'list',
'showAccountsIcons' => true
],
/*

View File

@ -23,7 +23,7 @@
</transition>
<div class="tfa-content is-size-3 is-size-4-mobile" @click.stop="showAccount(account)">
<div class="tfa-text has-ellipsis">
<img :src="'/storage/icons/' + account.icon" v-if="account.icon">
<img :src="'/storage/icons/' + account.icon" v-if="account.icon && $root.appSettings.showAccountsIcons">
{{ account.service }}
<span class="is-family-primary is-size-6 is-size-7-mobile has-text-grey ">{{ account.account }}</span>
</div>

View File

@ -10,6 +10,7 @@
<form-checkbox :form="form" fieldName="showTokenAsDot" :label="$t('settings.forms.show_token_as_dot.label')" :help="$t('settings.forms.show_token_as_dot.help')" />
<form-checkbox :form="form" fieldName="closeTokenOnCopy" :label="$t('settings.forms.close_token_on_copy.label')" :help="$t('settings.forms.close_token_on_copy.help')" />
<form-checkbox :form="form" fieldName="useBasicQrcodeReader" :label="$t('settings.forms.use_basic_qrcode_reader.label')" :help="$t('settings.forms.use_basic_qrcode_reader.help')" />
<form-checkbox :form="form" fieldName="showAccountsIcons" :label="$t('settings.forms.show_accounts_icons.label')" :help="$t('settings.forms.show_accounts_icons.help')" />
</form>
</form-wrapper>
</template>
@ -21,13 +22,12 @@
export default {
data(){
return {
// success: '',
// fail: '',
form: new Form({
lang: this.$root.$i18n.locale,
showTokenAsDot: this.$root.appSettings.showTokenAsDot,
closeTokenOnCopy: this.$root.appSettings.closeTokenOnCopy,
useBasicQrcodeReader: this.$root.appSettings.useBasicQrcodeReader,
showAccountsIcons: this.$root.appSettings.showAccountsIcons,
displayMode: this.$root.appSettings.displayMode,
}),
langs: [

View File

@ -45,6 +45,10 @@
],
'grid' => 'Grid',
'list' => 'List',
'show_accounts_icons' => [
'label' => 'Show icons',
'help' => 'Show icons accounts in the main view'
],
],

View File

@ -45,6 +45,10 @@
],
'grid' => 'Grille',
'list' => 'Liste',
'show_accounts_icons' => [
'label' => 'Afficher les icônes',
'help' => 'Affiche les icônes des comptes dans la vue principale'
],
],