mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
cluster-view battling -- part 2
Signed-off-by: Roman <ixrock@gmail.com> Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
1 parent
5452fdb32d
commit
09c765cab0
5 files changed
+50
-25
No files matched your search
@@ -3,6 +3,14 @@ import { ClusterId, clusterStore } from "./cluster-store";
|
||||
import { tracker } from "./tracker";
|
||||
|
||||
export const clusterIpc = {
|
||||
// todo: remove
|
||||
init: createIpcChannel({
|
||||
channel: "cluster:init",
|
||||
handle: async (clusterId: ClusterId) => {
|
||||
return clusterStore.getById(clusterId)?.pushState();
|
||||
},
|
||||
}),
|
||||
|
||||
activate: createIpcChannel({
|
||||
channel: "cluster:activate",
|
||||
handle: async (clusterId: ClusterId = clusterStore.activeClusterId) => {
|
||||
|
||||
+1
-1
@@ -129,7 +129,7 @@ export function broadcastIpc({ channel, webContentId, filter, args = [] }: IpcBr
|
||||
}
|
||||
views.forEach(webContent => {
|
||||
const type = webContent.getType();
|
||||
logger.debug(`[IPC]: sending message "${channel}" to ${type}=${webContent.id}`, { args });
|
||||
logger.debug(`[IPC]: broadcasting "${channel}" to ${type}=${webContent.id}`, { args });
|
||||
webContent.send(channel, ...[args].flat());
|
||||
})
|
||||
}
|
||||
Reference in new issue
Block a user