This commit is contained in:
Jonathan Carter 2020-05-29 09:38:04 -07:00
Родитель bd0bb188b0
Коммит 396239621d
4 изменённых файлов: 13 добавлений и 14 удалений

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

@ -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) ## v0.0.29 (05/27/2020)
- Fixed an issue with URI handling on Windows - Fixed an issue with URI handling on Windows

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

@ -492,10 +492,16 @@
{ {
"id": "codetour.tours", "id": "codetour.tours",
"name": "CodeTour", "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": [ "jsonValidation": [
{ {
"fileMatch": "*.tour", "fileMatch": "*.tour",

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

@ -9,7 +9,7 @@ import {
} from "vscode"; } from "vscode";
import { EXTENSION_NAME } from "../constants"; import { EXTENSION_NAME } from "../constants";
import { store } from "../store"; import { store } from "../store";
import { CodeTourNode, CodeTourStepNode, RecordTourNode } from "./nodes"; import { CodeTourNode, CodeTourStepNode } from "./nodes";
class CodeTourTreeProvider implements TreeDataProvider<TreeItem>, Disposable { class CodeTourTreeProvider implements TreeDataProvider<TreeItem>, Disposable {
private _disposables: Disposable[] = []; private _disposables: Disposable[] = [];
@ -46,7 +46,7 @@ class CodeTourTreeProvider implements TreeDataProvider<TreeItem>, Disposable {
async getChildren(element?: TreeItem): Promise<TreeItem[] | undefined> { async getChildren(element?: TreeItem): Promise<TreeItem[] | undefined> {
if (!element) { if (!element) {
if (!store.hasTours && !store.activeTour) { if (!store.hasTours && !store.activeTour) {
return [new RecordTourNode()]; return undefined;
} else { } else {
const tours = store.tours.map( const tours = store.tours.map(
tour => new CodeTourNode(tour, this.extensionPath) tour => new CodeTourNode(tour, this.extensionPath)

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

@ -129,14 +129,3 @@ export class CodeTourStepNode extends TreeItem {
this.contextValue = contextValues.join("."); this.contextValue = contextValues.join(".");
} }
} }
export class RecordTourNode extends TreeItem {
constructor() {
super("Record new tour...");
this.command = {
command: `${EXTENSION_NAME}.recordTour`,
title: "Record Tour"
};
}
}