Merge branch 'master' into extensions-api

# Conflicts:
#	src/renderer/components/app.tsx
#	src/renderer/components/cluster-manager/clusters-menu.scss
#	src/renderer/components/cluster-manager/clusters-menu.tsx
#	src/renderer/components/layout/main-layout.tsx
#	src/renderer/components/layout/sidebar.tsx
This commit is contained in:
Roman committed 2020-09-23 11:49:16 +03:00
commit 91b4823ec6
54 files changed
+619 -333

No files matched your search

+2 -2
View File
@@ -77,7 +77,7 @@ export class BaseStore<T = any> extends Singleton {
);
if (ipcMain) {
const callback = (event: IpcMainEvent, model: T) => {
logger.debug(`[STORE]: SYNC ${this.name} from renderer`, { model });
logger.silly(`[STORE]: SYNC ${this.name} from renderer`, { model });
this.onSync(model);
};
ipcMain.on(this.syncChannel, callback);
@@ -85,7 +85,7 @@ export class BaseStore<T = any> extends Singleton {
}
if (ipcRenderer) {
const callback = (event: IpcRendererEvent, model: T) => {
logger.debug(`[STORE]: SYNC ${this.name} from main`, { model });
logger.silly(`[STORE]: SYNC ${this.name} from main`, { model });
this.onSync(model);
};
ipcRenderer.on(this.syncChannel, callback);
+8
View File
@@ -14,6 +14,14 @@ export const clusterIpc = {
},
}),
refresh: createIpcChannel({
channel: "cluster:refresh",
handle: (clusterId: ClusterId) => {
const cluster = clusterStore.getById(clusterId);
if (cluster) return cluster.refresh();
},
}),
disconnect: createIpcChannel({
channel: "cluster:disconnect",
handle: (clusterId: ClusterId) => {
+1 -1
View File
@@ -76,7 +76,7 @@ export class ClusterStore extends BaseStore<ClusterStoreModel> {
if (ipcRenderer) {
ipcRenderer.on("cluster:state", (event, model: ClusterState) => {
this.applyWithoutSync(() => {
logger.debug(`[CLUSTER-STORE]: received push-state at ${location.host}`, model);
logger.silly(`[CLUSTER-STORE]: received push-state at ${location.host}`, model);
this.getById(model.id)?.updateModel(model);
})
})
+1 -1
View File
@@ -68,7 +68,7 @@ export function broadcastIpc({ channel, frameId, frameOnly, webContentId, filter
}
views.forEach(webContent => {
const type = webContent.getType();
logger.debug(`[IPC]: broadcasting "${channel}" to ${type}=${webContent.id}`, { args });
logger.silly(`[IPC]: broadcasting "${channel}" to ${type}=${webContent.id}`, { args });
if (!frameOnly) {
webContent.send(channel, ...args);
}