feat: don't show join button on viewtree if you already joined another workspace

This commit is contained in:
frelodev 2024-09-18 16:14:54 +02:00
parent e4b740f6d4
commit 9fd0b7e732
2 changed files with 20 additions and 20 deletions

View file

@ -74,7 +74,7 @@
"view/item/context": [
{
"command": "codemp.join",
"when": "view == codemp-tree-view && viewItem == workspace",
"when": "view == codemp-tree-view && viewItem == workspace_active",
"group": "inline"
},
{

View file

@ -62,7 +62,7 @@ export class CodempTreeProvider implements vscode.TreeDataProvider<CodempTreeIte
return out;
}
let items = workspace_list.map((x) =>
new CodempTreeItem(x, Type.Workspace, true, workspace !== null && workspace.id() == x)
new CodempTreeItem(x, Type.Workspace, true, workspace === null)
);
items.push(new CodempTreeItem("", Type.Placeholder, false));
items.push(new CodempTreeItem("<Users>", Type.UserList, true));