mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
1 parent
7a814635e1
commit
78a9fcde56
1 file changed
+2
-2
+2
-2
@@ -12,7 +12,7 @@ import logger from "./logger";
|
|||||||
|
|
||||||
export function initMenu(windowManager: WindowManager) {
|
export function initMenu(windowManager: WindowManager) {
|
||||||
autorun(() => {
|
autorun(() => {
|
||||||
logger.debug(`[MENU]: refreshing menu, cluster=${clusterStore.activeClusterId}`);
|
logger.debug(`[MENU]: building menu, cluster=${clusterStore.activeClusterId}`);
|
||||||
buildMenu(windowManager);
|
buildMenu(windowManager);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -20,9 +20,9 @@ export function initMenu(windowManager: WindowManager) {
|
|||||||
function buildMenu(windowManager: WindowManager) {
|
function buildMenu(windowManager: WindowManager) {
|
||||||
const hasClusters = clusterStore.hasClusters();
|
const hasClusters = clusterStore.hasClusters();
|
||||||
const activeClusterId = clusterStore.activeClusterId;
|
const activeClusterId = clusterStore.activeClusterId;
|
||||||
const clusterView = windowManager.getClusterView(activeClusterId);
|
|
||||||
|
|
||||||
function navigate(url: string) {
|
function navigate(url: string) {
|
||||||
|
const clusterView = windowManager.getClusterView(activeClusterId);
|
||||||
broadcastIpc({
|
broadcastIpc({
|
||||||
channel: "menu:navigate",
|
channel: "menu:navigate",
|
||||||
webContentId: clusterView ? clusterView.id : undefined /*no-clusters*/,
|
webContentId: clusterView ? clusterView.id : undefined /*no-clusters*/,
|
||||||
|
|||||||
Reference in new issue
Block a user