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

Ability to navigate context in different frames

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
Alex Andreev 2021-10-27 10:27:38 +03:00
parent 03177f3b14
commit 83125572d7

View File

@ -57,7 +57,13 @@ export class Sidebar extends React.Component<Props> {
static displayName = "Sidebar"; static displayName = "Sidebar";
@observable private contextMenu: CatalogEntityContextMenuContext = { @observable private contextMenu: CatalogEntityContextMenuContext = {
menuItems: [], menuItems: [],
navigate: (url: string) => broadcastMessage(IpcRendererNavigationEvents.NAVIGATE_IN_APP, url), navigate: (url: string, inMainFrame = true) => {
if (inMainFrame) {
broadcastMessage(IpcRendererNavigationEvents.NAVIGATE_IN_APP, url);
} else {
navigate(url);
}
}
}; };
constructor(props: Props) { constructor(props: Props) {