mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
fix: navigation via menu
Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
parent
7a814635e1
commit
78a9fcde56
@ -12,7 +12,7 @@ import logger from "./logger";
|
||||
|
||||
export function initMenu(windowManager: WindowManager) {
|
||||
autorun(() => {
|
||||
logger.debug(`[MENU]: refreshing menu, cluster=${clusterStore.activeClusterId}`);
|
||||
logger.debug(`[MENU]: building menu, cluster=${clusterStore.activeClusterId}`);
|
||||
buildMenu(windowManager);
|
||||
});
|
||||
}
|
||||
@ -20,9 +20,9 @@ export function initMenu(windowManager: WindowManager) {
|
||||
function buildMenu(windowManager: WindowManager) {
|
||||
const hasClusters = clusterStore.hasClusters();
|
||||
const activeClusterId = clusterStore.activeClusterId;
|
||||
const clusterView = windowManager.getClusterView(activeClusterId);
|
||||
|
||||
function navigate(url: string) {
|
||||
const clusterView = windowManager.getClusterView(activeClusterId);
|
||||
broadcastIpc({
|
||||
channel: "menu:navigate",
|
||||
webContentId: clusterView ? clusterView.id : undefined /*no-clusters*/,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user