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:
parent
cdc0af520d
commit
946519e397
3
src/common/cluster-frames.ts
Normal file
3
src/common/cluster-frames.ts
Normal file
@ -0,0 +1,3 @@
|
||||
import { observable } from "mobx"
|
||||
|
||||
export const clusterFrameMap = observable.map<string, number>();
|
||||
@ -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) => {
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user