From 7cb240f2141f78a88d07483b229aa0074bb2e136 Mon Sep 17 00:00:00 2001 From: worksofliam Date: Mon, 13 May 2024 16:58:47 -0400 Subject: [PATCH] Disable more UI options when editing a connection Signed-off-by: worksofliam --- package.json | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 1feacceb3..22f85906e 100644 --- a/package.json +++ b/package.json @@ -971,7 +971,8 @@ "command": "code-for-ibmi.connectTo", "title": "Connect to IBM i", "category": "IBM i", - "icon": "$(debug-start)" + "icon": "$(debug-start)", + "enablement": "code-for-ibmi:editingConnection !== true" }, { "command": "code-for-ibmi.connectToPrevious", @@ -983,7 +984,8 @@ { "command": "code-for-ibmi.connectToAndReload", "title": "Connect and Reload Server Settings", - "category": "IBM i" + "category": "IBM i", + "enablement": "code-for-ibmi:editingConnection !== true" }, { "command": "code-for-ibmi.refreshConnections", @@ -1002,27 +1004,32 @@ { "command": "code-for-ibmi.showAdditionalSettings", "title": "Connection Settings", - "category": "IBM i" + "category": "IBM i", + "enablement": "code-for-ibmi:editingConnection !== true" }, { "command": "code-for-ibmi.showLoginSettings", "title": "Login Settings", - "category": "IBM i" + "category": "IBM i", + "enablement": "code-for-ibmi:editingConnection !== true" }, { "command": "code-for-ibmi.renameConnection", "title": "Rename...", - "category": "IBM i" + "category": "IBM i", + "enablement": "code-for-ibmi:editingConnection !== true" }, { "command": "code-for-ibmi.deleteConnection", "title": "Delete...", - "category": "IBM i" + "category": "IBM i", + "enablement": "code-for-ibmi:editingConnection !== true" }, { "command": "code-for-ibmi.copyConnection", "title": "Copy...", - "category": "IBM i" + "category": "IBM i", + "enablement": "code-for-ibmi:editingConnection !== true" }, { "command": "code-for-ibmi.disconnect",