diff options
-rw-r--r-- | ui.js | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/ui.js b/ui.js index 7111493..d838a1d 100644 --- a/ui.js +++ b/ui.js @@ -355,11 +355,15 @@ class AppElement extends FocusElement { } else { items = [ // A label that just shows some brief information about the item. - isGroup && {label: - `(${item.name ? `"${item.name}"` : 'Unnamed'} -` + - ` ${item.items.length} item${item.items.length === 1 ? '' : 's'}` + - `, ${countTotalItems(item)} total` + - ')', keyboardIdentifier: item.name}, + {label: + `(${item.name ? `"${item.name}"` : 'Unnamed'}` + + (isGroup ? ( + ' -' + + ` ${item.items.length} item${item.items.length === 1 ? '' : 's'}` + + `, ${countTotalItems(item)} total`) + : '') + ')', + keyboardIdentifier: item.name + }, // The actual controls! {divider: true}, @@ -376,7 +380,7 @@ class AppElement extends FocusElement { editMode && {divider: true}, {element: this.whereControl}, - {element: this.orderControl}, + isGroup && {element: this.orderControl}, {label: 'Play!', action: emitControls(true)}, {label: 'Queue!', action: emitControls(false)}, {divider: true}, |