Skip to content

Commit 519462a

Browse files
added note icon and removed color label
Signed-off-by: msivasubramaniaan <msivasub@redhat.com>
1 parent 55ff176 commit 519462a

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

src/registriesView.ts

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -70,29 +70,15 @@ export class ComponentTypesView implements TreeDataProvider<ComponentType> {
7070

7171
// eslint-disable-next-line class-methods-use-this
7272
getTreeItem(element: ComponentType): TreeItem | Thenable<TreeItem> {
73-
const iconColor: vscode.ThemeColor = this.getColor(element);
7473
return {
7574
label: element.Name,
7675
contextValue: ContextType.DEVFILE_REGISTRY,
7776
tooltip: `Devfile Registry\nName: ${element.Name}\nURL: ${element.URL}`,
7877
collapsibleState: TreeItemCollapsibleState.None,
79-
iconPath: new vscode.ThemeIcon('circle-filled', iconColor)
78+
iconPath: new vscode.ThemeIcon('note')
8079
};
8180
}
8281

83-
/**
84-
* by default devfile returns red color for others it will randomly picks
85-
* @param element element
86-
* @returns color code
87-
*/
88-
private getColor(element: Registry): vscode.ThemeColor {
89-
const listColors = ['textLink.foreground', 'searchEditor.findMatchBackground',
90-
'merge.currentHeaderBackground', 'button.foreground', 'input.background'];
91-
const random = Math.floor(Math.random() * listColors.length);
92-
return element.URL?.toLowerCase().indexOf('https://registry.devfile.io') !== -1 ?
93-
new vscode.ThemeColor('editorError.foreground') : new vscode.ThemeColor(listColors[random]);
94-
}
95-
9682
addRegistry(newRegistry: Registry): void {
9783
this.registries.push(newRegistry);
9884
this.refresh(false);

0 commit comments

Comments
 (0)