dropdown hint option

This commit is contained in:
antelle 2020-04-23 19:12:15 +02:00
parent e568d06b02
commit 48a6189fe7
No known key found for this signature in database
GPG Key ID: 094A2F2D6136A4EE
2 changed files with 11 additions and 12 deletions

View File

@ -137,15 +137,15 @@ class ListSearchView extends View {
this.sortOptions.forEach(opt => {
opt.html = opt.loc();
});
const entryDesc = Features.isMobile
? ''
: ' <span class="muted-color">(' +
Locale.searchShiftClickOr +
' ' +
Shortcuts.altShortcutSymbol(true) +
'N)</span>';
this.createOptions = [
{ value: 'entry', icon: 'key', html: StringFormat.capFirst(Locale.entry) + entryDesc },
{
value: 'entry',
icon: 'key',
text: StringFormat.capFirst(Locale.entry),
hint: Features.isMobile
? null
: `(${Locale.searchShiftClickOr} ${Shortcuts.altShortcutSymbol(true)})`
},
{ value: 'group', icon: 'folder', text: StringFormat.capFirst(Locale.group) }
];
if (this.el) {

View File

@ -3,10 +3,9 @@
<div class="dropdown__item {{#if option.active}}dropdown__item--active{{/if}}" data-value="{{option.value}}">
<i class="fa fa-{{option.icon}} dropdown__item-icon"></i>
<span class="dropdown__item-text">
{{~#if option.text~}}
{{option.text}}
{{~else~}}
{{{option.html}}}
{{option.text}}
{{~#if option.hint~}}
&nbsp;<span class="muted-color">{{option.hint}}</span>
{{~/if~}}
</span>
</div>