Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen committed 2020-11-11 19:31:58 +02:00
1 parent 5393cf4ec9
commit 3bad5ddea6
6 files changed
+16 -19

No files matched your search

-2
View File
@@ -8,13 +8,11 @@ import * as EventBus from "./event-bus"
import * as Store from "./stores"
import * as Util from "./utils"
import * as ClusterFeature from "./cluster-feature"
import * as Navigation from "./navigation"
export {
App,
EventBus,
ClusterFeature,
Navigation,
Store,
Util,
}
-14
View File
@@ -1,14 +0,0 @@
import { ipcMain } from "electron";
import { WindowManager } from "../../main/window-manager";
import { navigate as navRenderer } from "../../renderer/navigation";
export { hideDetails, showDetails, getDetailsUrl } from "../../renderer/navigation"
export { RouteProps } from "react-router"
export { IURLParams } from "../../common/utils/buildUrl";
export async function navigate(location: string) {
if (ipcMain) {
await WindowManager.getInstance<WindowManager>().navigate(location)
} else {
navRenderer(location)
}
}
+5
View File
@@ -1,7 +1,12 @@
import type { MenuRegistration } from "./registries/menu-registry";
import { observable } from "mobx";
import { LensExtension } from "./lens-extension"
import { WindowManager } from "../main/window-manager";
export class LensMainExtension extends LensExtension {
@observable.shallow appMenus: MenuRegistration[] = []
async navigate(location: string, frameId?: number) {
await WindowManager.getInstance<WindowManager>().navigate(location, frameId)
}
}
+2
View File
@@ -3,8 +3,10 @@
// APIs
import * as Component from "./components"
import * as K8sApi from "./k8s-api"
import * as Navigation from "./navigation"
export {
Component,
K8sApi,
Navigation
}