From 9706ff10b9dabbf3d736226720c4bd660ccdeea1 Mon Sep 17 00:00:00 2001 From: Juozas Gaigalas Date: Tue, 12 Sep 2023 22:37:06 +0300 Subject: [PATCH] submenus --- package.json | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 58a75f50..aa70154b 100644 --- a/package.json +++ b/package.json @@ -156,7 +156,7 @@ }, { "command": "gitops.views.createGitRepository", - "title": "Create GitRepository from Path", + "title": "Create Source from Path", "category": "GitOps" }, { @@ -322,6 +322,12 @@ "when": "gitops:currentClusterGitOpsNotEnabled && !gitops:clusterUnreachable" } ], + "submenus": [ + { + "id": "gitops.explorer", + "label": "GitOps" + } + ], "menus": { "view/title": [ { @@ -471,17 +477,24 @@ "when": "view == gitops.views.templates" } ], - "explorer/context": [ + "gitops.explorer": [ { "command": "gitops.views.createGitRepository" }, { - "command": "gitops.flux.reconcileRepository" + "command": "gitops.flux.reconcileRepository", + "when": "explorerResourceIsFolder" }, { "command": "gitops.createKustomization" } ], + "explorer/context": [ + { + "submenu": "gitops.explorer" + } + ], + "commandPalette": [ { "command": "gitops.editor.openResource",