1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

add checkbox indication, setActive workspace on cluster select

Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
Roman 2020-10-06 16:31:14 +03:00
parent fdb5368914
commit 6e975fa4b6

View File

@ -85,11 +85,14 @@ export function createTrayMenu(windowManager: WindowManager): Menu {
return {
label: workspace.name,
toolTip: workspace.description,
submenu: clusters.map(({ id: clusterId, preferences: { clusterName: label }, online }) => {
submenu: clusters.map(cluster => {
const { id: clusterId, preferences: { clusterName: label }, online, workspace } = cluster;
return {
label: `${label}${online ? " (online)" : ""}`,
label: `${online ? '✓' : '\x20'.repeat(3)/*offset*/}${label}`,
toolTip: clusterId,
click() {
workspaceStore.setActive(workspace);
clusterStore.setActive(clusterId);
windowManager.bringToTop();
windowManager.navigate(clusterViewURL({ params: { clusterId } }));
}