chore: changed labels in treeview

This commit is contained in:
frelodev 2024-09-24 23:28:07 +02:00
parent 01a91d79ec
commit 90882cd9ae

View file

@ -70,7 +70,7 @@ export class CodempTreeProvider implements vscode.TreeDataProvider<CodempTreeIte
new CodempTreeItem(x, Type.Workspace, true, workspace === null) new CodempTreeItem(x, Type.Workspace, true, workspace === null)
); );
items.push(new CodempTreeItem("", Type.Placeholder, false)); items.push(new CodempTreeItem("", Type.Placeholder, false));
items.push(new CodempTreeItem("<Users>", Type.UserList, true)); items.push(new CodempTreeItem("Users", Type.UserList, true));
return items; return items;
} }
} }
@ -80,13 +80,14 @@ class CodempTreeItem extends vscode.TreeItem {
type: Type; type: Type;
constructor(label: string | vscode.TreeItemLabel, type: Type, expandable: boolean, active?: boolean){ constructor(label: string | vscode.TreeItemLabel, type: Type, expandable: boolean, active?: boolean){
let state = expandable ? vscode.TreeItemCollapsibleState.Expanded : vscode.TreeItemCollapsibleState.None; let state = expandable ? vscode.TreeItemCollapsibleState.Expanded : vscode.TreeItemCollapsibleState.None;
console.log(type.toString());
super(label, state); super(label, state);
this.type = type; this.type = type;
this.contextValue = type; this.contextValue = type;
if (active) this.contextValue += "_active"; if (active) this.contextValue += "_active";
if (type === Type.Workspace) this.iconPath = new vscode.ThemeIcon(active ? "timeline-pin" : "extensions-remote"); if (type === Type.Workspace) this.iconPath = new vscode.ThemeIcon(active ? "timeline-pin" : "extensions-remote");
else if (type === Type.Buffer) this.iconPath = new vscode.ThemeIcon(active ? "debug-restart-frame" : "debug-console-clear-all"); else if (type === Type.Buffer) this.iconPath = new vscode.ThemeIcon(active ? "debug-restart-frame" : "debug-console-clear-all");
else if (type === Type.UserList ) this.iconPath = new vscode.ThemeIcon("accounts-view-bar-icon");
else if (type === Type.User ) this.iconPath = new vscode.ThemeIcon("debug-breakpoint-data-unverified");
} }
} }