Show the current tour in the CodeTour tree

This commit is contained in:
Jonathan Carter 2020-03-28 11:26:45 -07:00
Родитель a6b3c9e106
Коммит 311bc1199c
3 изменённых файлов: 14 добавлений и 1 удалений

Просмотреть файл

@ -1,3 +1,7 @@
## v0.0.15 (03/28/2020)
- Updated the `CodeTour` tree to display the currently active tour, regardless how it was started
## v0.0.14 (03/26/2020)
- Added the `Export Tour` command to the `CodeTour` tree, which allows exporting a recorded tour that embeds the file contents needed to play it back

Просмотреть файл

@ -3,7 +3,7 @@
"displayName": "CodeTour",
"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.14",
"version": "0.0.15",
"repository": {
"type": "git",
"url": "https://github.com/vsls-contrib/codetour"

Просмотреть файл

@ -52,6 +52,15 @@ class CodeTourTreeProvider implements TreeDataProvider<TreeItem>, Disposable {
return new CodeTourNode(tour, this.extensionPath);
});
if (
store.activeTour &&
!store.tours.find(tour => tour.id === store.activeTour?.tour.id)
) {
tours.unshift(
new CodeTourNode(store.activeTour.tour, this.extensionPath)
);
}
return tours;
}
} else if (element instanceof CodeTourNode) {