From 276b6bc65c7e0067c3bbcda575b4599459386f21 Mon Sep 17 00:00:00 2001 From: Florrie Date: Sun, 12 May 2019 16:28:41 -0300 Subject: Show track title in context menus ...rather than just leaving a blank space where the title should be. --- ui.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'ui.js') 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}, -- cgit 1.3.0-6-gf8a5