Skip to content

Commit b769df5

Browse files
committed
feat: use proper light/dark icon set
1 parent 668bed7 commit b769df5

25 files changed

+32
-72
lines changed

media/creating.png

-3.74 KB
Binary file not shown.

media/dark/books.svg

Lines changed: 1 addition & 0 deletions
Loading

media/dark/error.svg

Lines changed: 1 addition & 0 deletions
Loading

media/dark/hourglass.svg

Lines changed: 1 addition & 0 deletions
Loading

media/dark/launch.svg

Lines changed: 1 addition & 0 deletions
Loading

media/dark/off.svg

Lines changed: 1 addition & 0 deletions
Loading

media/dark/on.svg

Lines changed: 1 addition & 0 deletions
Loading

media/dark/stop.svg

Lines changed: 1 addition & 0 deletions
Loading

media/docs.svg

Lines changed: 0 additions & 60 deletions
This file was deleted.

media/error.png

-40.3 KB
Binary file not shown.

media/light/books.svg

Lines changed: 1 addition & 0 deletions
Loading

media/light/error.svg

Lines changed: 1 addition & 0 deletions
Loading

media/light/hourglass.svg

Lines changed: 1 addition & 0 deletions
Loading

media/light/launch.svg

Lines changed: 1 addition & 0 deletions
Loading

media/light/off.svg

Lines changed: 1 addition & 0 deletions
Loading

media/light/on.svg

Lines changed: 1 addition & 0 deletions
Loading

media/light/stop.svg

Lines changed: 1 addition & 0 deletions
Loading

media/off.png

-22.1 KB
Binary file not shown.

media/on.png

-13.4 KB
Binary file not shown.

media/open.webp

-7.55 KB
Binary file not shown.

media/stop.png

-53.3 KB
Binary file not shown.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,16 +118,16 @@
118118
"command": "coderWorkspaces.shutdownWorkspace",
119119
"title": "Shutdown",
120120
"icon": {
121-
"light": "media/stop.png",
122-
"dark": "media/stop.png"
121+
"light": "media/light/stop.svg",
122+
"dark": "media//dark/stop.svg"
123123
}
124124
},
125125
{
126126
"command": "coderWorkspaces.openWorkspace",
127127
"title": "Open",
128128
"icon": {
129-
"light": "media/open.webp",
130-
"dark": "media/open.webp"
129+
"light": "media/light/launch.svg",
130+
"dark": "media/dark/launch.svg"
131131
}
132132
}
133133
]

src/extension.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import * as which from "which"
66

77
import {
88
CoderWorkspacesProvider,
9-
CoderWorkspace,
109
rebuildWorkspace,
1110
openWorkspace,
1211
shutdownWorkspace,

src/help.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ export class CoderHelpProvider implements vscode.TreeDataProvider<vscode.TreeIte
2626

2727
const docsLink = (): vscode.TreeItem => {
2828
const item = new vscode.TreeItem("Read the Coder Documentation", vscode.TreeItemCollapsibleState.None)
29-
item.iconPath = path.join(__filename, "..", "..", "media", "docs.svg")
29+
item.iconPath = {
30+
dark: path.join(__filename, "..", "..", "media", "dark", "books.svg"),
31+
light: path.join(__filename, "..", "..", "media", "light", "books.svg"),
32+
}
3033
item.command = {
3134
title: "Open Coder Documentation",
3235
command: "vscode.open",

src/workspaces.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,11 @@ export class CoderWorkspaceListItem extends vscode.TreeItem {
9797
const image = images.find((a) => a.id === workspace.image_id)!
9898
this.description = `${image.repository}:${workspace.image_tag}, ${workspace.cpu_cores} vCPU, ${workspace.memory_gb}GB Memory`
9999

100-
this.iconPath = workspaceIcon(workspace)
100+
const icon = workspaceIcon(workspace)
101+
this.iconPath = {
102+
dark: path.join(mediaDir, "dark", icon),
103+
light: path.join(mediaDir, "light", icon),
104+
}
101105
this.tooltip = `${this.label}
102106
${image.repository}:${workspace.image_tag}
103107
${workspace.cpu_cores} vCPU
@@ -107,10 +111,10 @@ ${workspace.memory_gb} GB Memory`
107111

108112
const workspaceIcon = ({ latest_stat: { container_status } }: CoderWorkspace): string => {
109113
const file = {
110-
OFF: "off.png",
111-
CREATING: "creating.png",
112-
ERROR: "error.png",
113-
ON: "on.png",
114+
OFF: "off.svg",
115+
CREATING: "hourglass.svg",
116+
ERROR: "error.svg",
117+
ON: "on.svg",
114118
}[container_status]
115-
return path.join(mediaDir, file!)
119+
return file!
116120
}

0 commit comments

Comments
 (0)