mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
1 parent
0d16f6132d
commit
182346095b
6 files changed
+13
-10
No files matched your search
@@ -7,6 +7,8 @@ export class LensMainExtension extends LensExtension {
|
||||
@observable.shallow appMenus: MenuRegistration[] = []
|
||||
|
||||
async navigate(location: string, frameId?: number) {
|
||||
await WindowManager.getInstance<WindowManager>().navigate(location, frameId)
|
||||
const windowManager = WindowManager.getInstance<WindowManager>();
|
||||
const url = this.getPageUrl(location);
|
||||
await windowManager.navigate(url, frameId)
|
||||
}
|
||||
}
|
||||
@@ -17,4 +17,9 @@ export class LensRendererExtension extends LensExtension {
|
||||
@observable.shallow statusBarItems: StatusBarRegistration[] = []
|
||||
@observable.shallow kubeObjectDetailItems: KubeObjectDetailRegistration[] = []
|
||||
@observable.shallow kubeObjectMenuItems: KubeObjectMenuRegistration[] = []
|
||||
|
||||
async navigate(location: string){
|
||||
const { navigate } = await import("../renderer/navigation");
|
||||
navigate(this.getPageUrl(location));
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
export { RouteProps } from "react-router"
|
||||
export { navigate } from "../../renderer/navigation";
|
||||
export { hideDetails, showDetails, getDetailsUrl } from "../../renderer/navigation"
|
||||
export { IURLParams } from "../../common/utils/buildUrl";
|
||||
@@ -4,11 +4,11 @@ import { ipcRenderer } from "electron";
|
||||
import { matchPath, RouteProps } from "react-router";
|
||||
import { reaction } from "mobx";
|
||||
import { createObservableHistory } from "mobx-observable-history";
|
||||
import { createBrowserHistory, createMemoryHistory, LocationDescriptor } from "history";
|
||||
import { createBrowserHistory, LocationDescriptor } from "history";
|
||||
import logger from "../main/logger";
|
||||
import { clusterViewRoute, IClusterViewRouteParams } from "./components/cluster-manager/cluster-view.route";
|
||||
|
||||
export const history = typeof window !== "undefined" ? createBrowserHistory() : createMemoryHistory();
|
||||
export const history = createBrowserHistory();
|
||||
export const navigation = createObservableHistory(history);
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user