@@ -20,20 +20,24 @@ export class CoderHelpProvider implements vscode.TreeDataProvider<vscode.TreeIte
20
20
}
21
21
22
22
getChildren ( element ?: vscode . TreeItem ) : Thenable < vscode . TreeItem [ ] > {
23
- return Promise . resolve ( [ docsLink ( ) ] )
23
+ return Promise . resolve ( [
24
+ makeSimpleLink ( "Read the Coder Documentation" , "books.svg" , "https://coder.com/docs" ) ,
25
+ makeSimpleLink ( "Watch Coder on YouTube" , "video.svg" , "https://www.youtube.com/channel/UCWexK_ECcUU3vEIdb-VYkfw" ) ,
26
+ makeSimpleLink ( "Contact Us" , "feedback.svg" , "https://coder.com/contact" ) ,
27
+ ] )
24
28
}
25
29
}
26
30
27
- const docsLink = ( ) : vscode . TreeItem => {
28
- const item = new vscode . TreeItem ( "Read the Coder Documentation" , vscode . TreeItemCollapsibleState . None )
31
+ const makeSimpleLink = ( label : string , icon : string , url : string ) : vscode . TreeItem => {
32
+ const item = new vscode . TreeItem ( label , vscode . TreeItemCollapsibleState . None )
29
33
item . iconPath = {
30
- dark : path . join ( __filename , ".." , ".." , "media" , "dark" , "books.svg" ) ,
31
- light : path . join ( __filename , ".." , ".." , "media" , "light" , "books.svg" ) ,
34
+ dark : path . join ( __filename , ".." , ".." , "media" , "dark" , icon ) ,
35
+ light : path . join ( __filename , ".." , ".." , "media" , "light" , icon ) ,
32
36
}
33
37
item . command = {
34
- title : "Open Coder Documentation" ,
38
+ title : label ,
35
39
command : "vscode.open" ,
36
- arguments : [ vscode . Uri . parse ( "https://coder.com/docs" ) ] ,
40
+ arguments : [ vscode . Uri . parse ( url ) ] ,
37
41
}
38
42
return item
39
43
}
0 commit comments