1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Navigate cluster context menus via broadcastMessage

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2021-10-26 10:51:20 +03:00
parent bbfb8372f3
commit 03177f3b14

View File

@ -45,6 +45,8 @@ import { HotbarIcon } from "../hotbar/hotbar-icon";
import { makeObservable, observable } from "mobx";
import type { CatalogEntityContextMenuContext } from "../../../common/catalog";
import { HotbarStore } from "../../../common/hotbar-store";
import { broadcastMessage } from "../../../common/ipc";
import { IpcRendererNavigationEvents } from "../../navigation/events";
interface Props {
className?: string;
@ -55,7 +57,7 @@ export class Sidebar extends React.Component<Props> {
static displayName = "Sidebar";
@observable private contextMenu: CatalogEntityContextMenuContext = {
menuItems: [],
navigate,
navigate: (url: string) => broadcastMessage(IpcRendererNavigationEvents.NAVIGATE_IN_APP, url),
};
constructor(props: Props) {