mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
1 parent
a489d9aabe
commit
1fc8ff0abc
7 files changed
+13
-20
No files matched your search
@@ -6,9 +6,9 @@ import { WindowManager } from "../main/window-manager";
|
||||
export class LensMainExtension extends LensExtension {
|
||||
@observable.shallow appMenus: MenuRegistration[] = []
|
||||
|
||||
async navigate(location: string, frameId?: number) {
|
||||
async navigate(location?: string, frameId?: number) {
|
||||
const windowManager = WindowManager.getInstance<WindowManager>();
|
||||
const url = this.getPageUrl(location);
|
||||
await windowManager.navigate(url, frameId)
|
||||
const url = this.getPageUrl(location); // get full path to extension's page
|
||||
await windowManager.navigate(url, frameId);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
import type { AppPreferenceRegistration, ClusterFeatureRegistration, KubeObjectDetailRegistration, KubeObjectMenuRegistration, KubeObjectStatusRegistration, PageMenuRegistration, PageRegistration, StatusBarRegistration, } from "./registries"
|
||||
import { ipcRenderer } from "electron"
|
||||
import { observable } from "mobx";
|
||||
import { LensExtension } from "./lens-extension"
|
||||
|
||||
@@ -15,7 +14,8 @@ export class LensRendererExtension extends LensExtension {
|
||||
@observable.shallow kubeObjectDetailItems: KubeObjectDetailRegistration[] = []
|
||||
@observable.shallow kubeObjectMenuItems: KubeObjectMenuRegistration[] = []
|
||||
|
||||
navigate(location: string) {
|
||||
ipcRenderer.emit("renderer:navigate", this.getPageUrl(location))
|
||||
async navigate(location?: string) {
|
||||
const { navigate } = await import("../renderer/navigation");
|
||||
navigate(this.getPageUrl(location));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user