mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
include the hotbar index in the label displayed for a hotbar (#2770)
* include the hotbar index in the label displayed for a hotbar Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com> * address review comments for hotbarDisplayLabel() Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com> * tweaks to hotbarDisplayLabel() Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>
This commit is contained in:
1 parent
623973add0
commit
c594844b9b
5 files changed
+47
-5
No files matched your search
@@ -27,6 +27,7 @@ import { HotbarStore } from "../../../common/hotbar-store";
|
||||
import { CommandOverlay } from "../command-palette";
|
||||
import { HotbarAddCommand } from "./hotbar-add-command";
|
||||
import { HotbarRemoveCommand } from "./hotbar-remove-command";
|
||||
import { hotbarDisplayLabel } from "./hotbar-display-label";
|
||||
|
||||
@observer
|
||||
export class HotbarSwitchCommand extends React.Component {
|
||||
@@ -36,7 +37,7 @@ export class HotbarSwitchCommand extends React.Component {
|
||||
@computed get options() {
|
||||
const hotbarStore = HotbarStore.getInstance();
|
||||
const options = hotbarStore.hotbars.map((hotbar) => {
|
||||
return { value: hotbar.id, label: hotbar.name };
|
||||
return { value: hotbar.id, label: hotbarDisplayLabel(hotbar.id) };
|
||||
});
|
||||
|
||||
options.push({ value: HotbarSwitchCommand.addActionId, label: "Add hotbar ..." });
|
||||
|
||||
Reference in new issue
Block a user