Adding active tour icon
This commit is contained in:
Родитель
4cb9916ac7
Коммит
69cdcdf861
|
@ -3,7 +3,7 @@
|
|||
"displayName": "Code Tour",
|
||||
"description": "VS Code extension that allows you to record and playback guided tours of codebases, directly within the editor",
|
||||
"publisher": "vsls-contrib",
|
||||
"version": "0.0.3",
|
||||
"version": "0.0.4",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/vsls-contrib/code-tour"
|
||||
|
|
|
@ -31,13 +31,20 @@ export class CodeTourNode extends TreeItem {
|
|||
contextValues.push("recording");
|
||||
}
|
||||
|
||||
if (store.currentTour && tour.title === store.currentTour?.title) {
|
||||
const isActive =
|
||||
store.currentTour && tour.title === store.currentTour?.title;
|
||||
if (isActive) {
|
||||
contextValues.push("active");
|
||||
}
|
||||
|
||||
this.contextValue = contextValues.join(".");
|
||||
|
||||
const icon = isRecording ? "tour-recording" : "tour";
|
||||
const icon = isRecording
|
||||
? "tour-recording"
|
||||
: isActive
|
||||
? "tour-active"
|
||||
: "tour";
|
||||
|
||||
this.iconPath = {
|
||||
dark: path.join(extensionPath, `images/dark/${icon}.svg`),
|
||||
light: path.join(extensionPath, `images/light/${icon}.svg`)
|
||||
|
|
Загрузка…
Ссылка в новой задаче