Skip to content

Commit d9a5b20

Browse files
committed
feat: add more help links
1 parent 50b87df commit d9a5b20

File tree

6 files changed

+19
-9
lines changed

6 files changed

+19
-9
lines changed

media/dark/feedback.svg

Lines changed: 1 addition & 0 deletions
Loading

media/dark/video.svg

Lines changed: 1 addition & 0 deletions
Loading

media/light/feedback.svg

Lines changed: 1 addition & 0 deletions
Loading

media/light/video.svg

Lines changed: 1 addition & 0 deletions
Loading

src/help.ts

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,24 @@ export class CoderHelpProvider implements vscode.TreeDataProvider<vscode.TreeIte
2020
}
2121

2222
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+
])
2428
}
2529
}
2630

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)
2933
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),
3236
}
3337
item.command = {
34-
title: "Open Coder Documentation",
38+
title: label,
3539
command: "vscode.open",
36-
arguments: [vscode.Uri.parse("https://coder.com/docs")],
40+
arguments: [vscode.Uri.parse(url)],
3741
}
3842
return item
3943
}

src/workspaces.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ export interface CoderWorkspace {
7979
latest_stat: {
8080
container_status: string
8181
}
82+
disk_gb: number
8283
}
8384

8485
export interface CoderImage {
@@ -96,7 +97,7 @@ export class CoderWorkspaceListItem extends vscode.TreeItem {
9697
super(workspace.name, collapsibleState)
9798

9899
const image = images.find((a) => a.id === workspace.image_id)!
99-
this.description = `${image.repository}:${workspace.image_tag}, ${workspace.cpu_cores} vCPU, ${workspace.memory_gb}GB Memory`
100+
this.description = `${image.repository}:${workspace.image_tag}, ${workspace.cpu_cores} vCPU, ${workspace.memory_gb} GB RAM`
100101

101102
const icon = workspaceIcon(workspace)
102103
this.iconPath = {
@@ -106,7 +107,8 @@ export class CoderWorkspaceListItem extends vscode.TreeItem {
106107
this.tooltip = `${this.label}
107108
${image.repository}:${workspace.image_tag}
108109
${workspace.cpu_cores} vCPU
109-
${workspace.memory_gb} GB Memory`
110+
${workspace.memory_gb} GB RAM
111+
${workspace.disk_gb} GB Disk`
110112
}
111113
}
112114

0 commit comments

Comments
 (0)