mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
don't show remove-from-hotbar on catalog context menu
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
parent
412162fa71
commit
a0210db10a
@ -66,16 +66,6 @@ export class Catalog extends React.Component {
|
|||||||
hotbar.items.push({ entity: { uid: item.id }});
|
hotbar.items.push({ entity: { uid: item.id }});
|
||||||
}
|
}
|
||||||
|
|
||||||
removeFromHotbar(item: CatalogEntityItem) {
|
|
||||||
const hotbar = hotbarStore.getActive();
|
|
||||||
|
|
||||||
if (!hotbar) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
hotbar.items = hotbar.items.filter((i) => i.entity.uid !== item.id);
|
|
||||||
}
|
|
||||||
|
|
||||||
onDetails(item: CatalogEntityItem) {
|
onDetails(item: CatalogEntityItem) {
|
||||||
item.onRun(catalogEntityRunContext);
|
item.onRun(catalogEntityRunContext);
|
||||||
}
|
}
|
||||||
@ -137,9 +127,6 @@ export class Catalog extends React.Component {
|
|||||||
<MenuItem key="add-to-hotbar" onClick={() => this.addToHotbar(item) }>
|
<MenuItem key="add-to-hotbar" onClick={() => this.addToHotbar(item) }>
|
||||||
<Icon material="add" small interactive={true} title="Add to hotbar"/> Add to Hotbar
|
<Icon material="add" small interactive={true} title="Add to hotbar"/> Add to Hotbar
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem key="remove-from-hotbar" onClick={() => this.removeFromHotbar(item) }>
|
|
||||||
<Icon material="clear" small interactive={true} title="Remove from hotbar"/> Remove from Hotbar
|
|
||||||
</MenuItem>
|
|
||||||
{ menuItems.map((menuItem, index) => {
|
{ menuItems.map((menuItem, index) => {
|
||||||
return (
|
return (
|
||||||
<MenuItem key={index} onClick={() => this.onMenuItemClick(menuItem)}>
|
<MenuItem key={index} onClick={() => this.onMenuItemClick(menuItem)}>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user