Skip to content
Snippets Groups Projects
Commit d2c3d034 authored by Mohamed AZIKIOU's avatar Mohamed AZIKIOU
Browse files

feat: hide explorer when not in container

parent 2a605df4
Branches
Tags
No related merge requests found
Pipeline #15087 failed
...@@ -55,8 +55,8 @@ ...@@ -55,8 +55,8 @@
{ {
"id": "deadlockPanel", "id": "deadlockPanel",
"name": "Explorer", "name": "Explorer",
"icon": "media/dep.svg", "contextualTitle": "Deadlock",
"contextualTitle": "Deadlock" "when": "deadlock.inContainer"
}, },
{ {
"id": "help", "id": "help",
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
"name": "Commands", "name": "Commands",
"icon": "media/dep.svg", "icon": "media/dep.svg",
"contextualTitle": "Deadlock", "contextualTitle": "Deadlock",
"when": "deadlock.showCommands" "when": "deadlock.inContainer"
} }
] ]
}, },
......
...@@ -18,10 +18,10 @@ export async function activate(context: ExtensionContext) { ...@@ -18,10 +18,10 @@ export async function activate(context: ExtensionContext) {
const deadlockPanelProvider = new DepNodeProvider(); const deadlockPanelProvider = new DepNodeProvider();
window.registerTreeDataProvider('deadlockPanel', deadlockPanelProvider); window.registerTreeDataProvider('deadlockPanel', deadlockPanelProvider);
if (isDocker()) { if (isDocker()) {
commands.executeCommand('setContext', 'deadlock.showCommands', true); commands.executeCommand('setContext', 'deadlock.inContainer', true);
window.registerTreeDataProvider('commandTree', new CommandTreeProvider(context)); window.registerTreeDataProvider('commandTree', new CommandTreeProvider(context));
} else { } else {
commands.executeCommand('setContext', 'deadlock.showCommands', false); commands.executeCommand('setContext', 'deadlock.inContainer', false);
} }
try { try {
await userConfig.init(); await userConfig.init();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment