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

fix cyclic dependencies

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen 2020-11-19 10:19:28 +02:00
parent cdc0af520d
commit 946519e397
4 changed files with 7 additions and 4 deletions

View File

@ -0,0 +1,3 @@
import { observable } from "mobx"
export const clusterFrameMap = observable.map<string, number>();

View File

@ -3,14 +3,14 @@ import { ClusterId, clusterStore } from "./cluster-store";
import { appEventBus } from "./event-bus"
import { ResourceApplier } from "../main/resource-applier";
import { ipcMain } from "electron";
import { observable } from "mobx";
import { clusterFrameMap } from "./cluster-frames"
export const clusterActivateHandler = "cluster:activate"
export const clusterSetFrameIdHandler = "cluster:set-frame-id"
export const clusterRefreshHandler = "cluster:refresh"
export const clusterDisconnectHandler = "cluster:disconnect"
export const clusterKubectlApplyAllHandler = "cluster:kubectl-apply-all"
export const clusterFrameMap = observable.map<ClusterId, number>();
if (ipcMain) {
handleRequest(clusterActivateHandler, (event, clusterId: ClusterId, force = false) => {

View File

@ -4,7 +4,7 @@
import { ipcMain, ipcRenderer, webContents, remote } from "electron";
import logger from "../main/logger";
import { clusterFrameMap } from "./cluster-ipc";
import { clusterFrameMap } from "./cluster-frames";
export function handleRequest(channel: string, listener: (...args: any[]) => any) {
ipcMain.handle(channel, listener)

View File

@ -7,7 +7,7 @@ import { subscribeToBroadcast } from "../common/ipc"
import { initMenu } from "./menu";
import { initTray } from "./tray";
import { Singleton } from "../common/utils";
import { clusterFrameMap } from "../common/cluster-ipc";
import { clusterFrameMap } from "../common/cluster-frames";
export class WindowManager extends Singleton {
protected mainWindow: BrowserWindow;