Always show tree view
This commit is contained in:
Родитель
bd0bb188b0
Коммит
396239621d
|
@ -1,3 +1,7 @@
|
|||
## v0.0.30 (05/28/2020)
|
||||
|
||||
- Changed the `CodeTour` tree to be always visible by default, as long as you have one or more workspaces opened.
|
||||
|
||||
## v0.0.29 (05/27/2020)
|
||||
|
||||
- Fixed an issue with URI handling on Windows
|
||||
|
|
|
@ -492,10 +492,16 @@
|
|||
{
|
||||
"id": "codetour.tours",
|
||||
"name": "CodeTour",
|
||||
"when": "codetour:hasTours || codetour:inTour"
|
||||
"when": "workspaceFolderCount != 0"
|
||||
}
|
||||
]
|
||||
},
|
||||
"viewsWelcome": [
|
||||
{
|
||||
"view": "codetour.tours",
|
||||
"contents": "In order to create a guided walkthrough, you can begin recording a tour for the currently opened workspace ([Learn More](https://github.com/vsls-contrib/codetour#recording-tours)).\n\n[Record Tour](command:codetour.recordTour)\n\nYou can also open tours that were shared with you by others ([Learn More](https://github.com/vsls-contrib/codetour#opening-tours)).\n\n[Open Tour File](command:codetour.openTourFile)\n\n[Open Tour URL](command:codetour.openTourUrl)"
|
||||
}
|
||||
],
|
||||
"jsonValidation": [
|
||||
{
|
||||
"fileMatch": "*.tour",
|
||||
|
|
|
@ -9,7 +9,7 @@ import {
|
|||
} from "vscode";
|
||||
import { EXTENSION_NAME } from "../constants";
|
||||
import { store } from "../store";
|
||||
import { CodeTourNode, CodeTourStepNode, RecordTourNode } from "./nodes";
|
||||
import { CodeTourNode, CodeTourStepNode } from "./nodes";
|
||||
|
||||
class CodeTourTreeProvider implements TreeDataProvider<TreeItem>, Disposable {
|
||||
private _disposables: Disposable[] = [];
|
||||
|
@ -46,7 +46,7 @@ class CodeTourTreeProvider implements TreeDataProvider<TreeItem>, Disposable {
|
|||
async getChildren(element?: TreeItem): Promise<TreeItem[] | undefined> {
|
||||
if (!element) {
|
||||
if (!store.hasTours && !store.activeTour) {
|
||||
return [new RecordTourNode()];
|
||||
return undefined;
|
||||
} else {
|
||||
const tours = store.tours.map(
|
||||
tour => new CodeTourNode(tour, this.extensionPath)
|
||||
|
|
|
@ -129,14 +129,3 @@ export class CodeTourStepNode extends TreeItem {
|
|||
this.contextValue = contextValues.join(".");
|
||||
}
|
||||
}
|
||||
|
||||
export class RecordTourNode extends TreeItem {
|
||||
constructor() {
|
||||
super("Record new tour...");
|
||||
|
||||
this.command = {
|
||||
command: `${EXTENSION_NAME}.recordTour`,
|
||||
title: "Record Tour"
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче