mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Remove windowManager from extension api (#1323)
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
1 parent
6a908cb528
commit
00be4aa184
11 files changed
+31
-16
No files matched your search
@@ -2,8 +2,6 @@
|
||||
export * from "../lens-main-extension"
|
||||
export * from "../lens-renderer-extension"
|
||||
|
||||
import type { WindowManager } from "../../main/window-manager";
|
||||
|
||||
// APIs
|
||||
import * as App from "./app"
|
||||
import * as EventBus from "./event-bus"
|
||||
@@ -12,9 +10,6 @@ import * as Util from "./utils"
|
||||
import * as ClusterFeature from "./cluster-feature"
|
||||
import * as Interface from "../interfaces"
|
||||
|
||||
// TODO: allow to expose windowManager.navigate() as Navigation.navigate() in runtime
|
||||
export let windowManager: WindowManager;
|
||||
|
||||
export {
|
||||
App,
|
||||
EventBus,
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
@@ -8,5 +8,5 @@ import * as Navigation from "./navigation"
|
||||
export {
|
||||
Component,
|
||||
K8sApi,
|
||||
Navigation,
|
||||
Navigation
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
export { navigate, hideDetails, showDetails, getDetailsUrl } from "../../renderer/navigation"
|
||||
export { navigate } from "../../renderer/navigation";
|
||||
export { hideDetails, showDetails, getDetailsUrl } from "../../renderer/navigation"
|
||||
export { RouteProps } from "react-router"
|
||||
export { IURLParams } from "../../common/utils/buildUrl";
|
||||
Reference in new issue
Block a user