diff options
author | Florrie <towerofnix@gmail.com> | 2019-05-12 16:28:41 -0300 |
---|---|---|
committer | Florrie <towerofnix@gmail.com> | 2019-05-12 16:28:41 -0300 |
commit | 276b6bc65c7e0067c3bbcda575b4599459386f21 (patch) | |
tree | 8c348475d94453b63b731814ad0d68f6ebed2c3e | |
parent | 6ba08342206625bcabb224c8f8c30db9500597c4 (diff) |
Show track title in context menus
...rather than just leaving a blank space where the title should be.
-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}, |