File tree Expand file tree Collapse file tree 1 file changed +1
-15
lines changed
Expand file tree Collapse file tree 1 file changed +1
-15
lines changed Original file line number Diff line number Diff 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 ) ;
You can’t perform that action at this time.
0 commit comments