Book Fixes (#14931)

* change folder icon and fix book path

* change folder icon in dark mode

* add folder.svg under resources
This commit is contained in:
Barbara Valdez
2021-03-31 14:02:08 -07:00
committed by GitHub
parent 2164bc0bb9
commit fc13fb2200
4 changed files with 7 additions and 5 deletions

View File

@@ -23,8 +23,8 @@ export class IconPathHelper {
light: IconPathHelper.extensionContext.asAbsolutePath('resources/light/delete.svg')
};
IconPathHelper.folder = {
dark: IconPathHelper.extensionContext.asAbsolutePath('resources/dark/folder_inverse.svg'),
light: IconPathHelper.extensionContext.asAbsolutePath('resources/light/folder.svg')
dark: IconPathHelper.extensionContext.asAbsolutePath('resources/folder.svg'),
light: IconPathHelper.extensionContext.asAbsolutePath('resources/folder.svg')
};
}
}

View File

@@ -59,7 +59,7 @@ export class AddFileDialog {
this._saveLocationInputBox = this.view.modelBuilder.inputBox()
.withProperties({
value: this._bookItem.contextValue === BookTreeItemType.Book ? this._bookItem.rootContentPath : path.dirname(this._bookItem.resourceUri.fsPath),
value: this._bookItem.contextValue === BookTreeItemType.savedBook ? this._bookItem.rootContentPath : path.dirname(this._bookItem.resourceUri.fsPath),
enabled: false,
width: '400px'
}).component();
@@ -94,7 +94,7 @@ export class AddFileDialog {
private async createFile(): Promise<boolean> {
try {
const dirPath = this._bookItem.contextValue === BookTreeItemType.Book ? this._bookItem.rootContentPath : path.dirname(this._bookItem.resourceUri.fsPath);
const dirPath = this._bookItem.contextValue === BookTreeItemType.savedBook ? this._bookItem.rootContentPath : path.dirname(this._bookItem.resourceUri.fsPath);
const filePath = path.join(dirPath, this._fileNameInputBox.value).concat(this._extension);
await this.validatePath(dirPath, this._fileNameInputBox.value.concat(this._extension));
const pathDetails = new TocEntryPathHandler(filePath, this._bookItem.rootContentPath, this._titleInputBox.value);