From fc13fb220013a47cbd749423639db9a84de679a4 Mon Sep 17 00:00:00 2001
From: Barbara Valdez <34872381+barbaravaldez@users.noreply.github.com>
Date: Wed, 31 Mar 2021 14:02:08 -0700
Subject: [PATCH] Book Fixes (#14931)
* change folder icon and fix book path
* change folder icon in dark mode
* add folder.svg under resources
---
extensions/notebook/resources/folder.svg | 3 +++
extensions/notebook/resources/light/folder.svg | 1 -
extensions/notebook/src/common/iconHelper.ts | 4 ++--
extensions/notebook/src/dialog/addFileDialog.ts | 4 ++--
4 files changed, 7 insertions(+), 5 deletions(-)
create mode 100644 extensions/notebook/resources/folder.svg
delete mode 100644 extensions/notebook/resources/light/folder.svg
diff --git a/extensions/notebook/resources/folder.svg b/extensions/notebook/resources/folder.svg
new file mode 100644
index 0000000000..64cbba1769
--- /dev/null
+++ b/extensions/notebook/resources/folder.svg
@@ -0,0 +1,3 @@
+
diff --git a/extensions/notebook/resources/light/folder.svg b/extensions/notebook/resources/light/folder.svg
deleted file mode 100644
index 8442363a76..0000000000
--- a/extensions/notebook/resources/light/folder.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/extensions/notebook/src/common/iconHelper.ts b/extensions/notebook/src/common/iconHelper.ts
index 23d1011399..756938fc0a 100644
--- a/extensions/notebook/src/common/iconHelper.ts
+++ b/extensions/notebook/src/common/iconHelper.ts
@@ -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')
};
}
}
diff --git a/extensions/notebook/src/dialog/addFileDialog.ts b/extensions/notebook/src/dialog/addFileDialog.ts
index 0dac3bc648..872e730ccf 100644
--- a/extensions/notebook/src/dialog/addFileDialog.ts
+++ b/extensions/notebook/src/dialog/addFileDialog.ts
@@ -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 {
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);