Merge pull request #10479 from nextcloud/bugfix/noid/personal-settings-icon-visibility

Use icon classes in personal settings
This commit is contained in:
Roeland Jago Douma 2018-08-01 12:57:48 +02:00 committed by GitHub
commit e65ca39993
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,13 +16,10 @@
'{{#each items}}' + '{{#each items}}' +
'<li>' + '<li>' +
'<a href="#" class="menuitem action action-{{name}} permanent {{#if active}}active{{/if}}" data-action="{{name}}">' + '<a href="#" class="menuitem action action-{{name}} permanent {{#if active}}active{{/if}}" data-action="{{name}}">' +
'{{#if icon}}<img class="icon" src="{{icon}}"/>' + '{{#if iconClass}}' +
'{{else}}'+ '<span class="icon {{iconClass}}"></span>' +
'{{#if iconClass}}' + '{{else}}' +
'<span class="icon {{iconClass}}"></span>' + '<span class="no-icon"></span>' +
'{{else}}' +
'<span class="no-icon"></span>' +
'{{/if}}' +
'{{/if}}' + '{{/if}}' +
'<p><strong class="menuitem-text">{{displayName}}</strong><br>' + '<p><strong class="menuitem-text">{{displayName}}</strong><br>' +
'<span class="menuitem-text-detail">{{tooltip}}</span></p></a>' + '<span class="menuitem-text-detail">{{tooltip}}</span></p></a>' +
@ -48,21 +45,21 @@
name: 'private', name: 'private',
displayName: (this.field === 'avatar' || this.field === 'displayname') ? t('settings', 'Local') : t('settings', 'Private'), displayName: (this.field === 'avatar' || this.field === 'displayname') ? t('settings', 'Local') : t('settings', 'Private'),
tooltip: (this.field === 'avatar' || this.field === 'displayname') ? t('settings', 'Only visible to local users') : t('settings', 'Only visible to you'), tooltip: (this.field === 'avatar' || this.field === 'displayname') ? t('settings', 'Only visible to local users') : t('settings', 'Only visible to you'),
icon: OC.imagePath('core', 'actions/password'), iconClass: 'icon-password',
active: false active: false
}, },
{ {
name: 'contacts', name: 'contacts',
displayName: t('settings', 'Contacts'), displayName: t('settings', 'Contacts'),
tooltip: t('settings', 'Visible to local users and to trusted servers'), tooltip: t('settings', 'Visible to local users and to trusted servers'),
icon: OC.imagePath('core', 'places/contacts'), iconClass: 'icon-contacts-dark',
active: false active: false
}, },
{ {
name: 'public', name: 'public',
displayName: t('settings', 'Public'), displayName: t('settings', 'Public'),
tooltip: t('settings', 'Will be synced to a global and public address book'), tooltip: t('settings', 'Will be synced to a global and public address book'),
icon: OC.imagePath('core', 'places/link'), iconClass: 'icon-link',
active: false active: false
} }
]; ];