mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Fix decorations for modified notebooks in Books View (#14152)
* Tree item resource uri should be the root when it's a book and notebook path for notebooks
This commit is contained in:
@@ -82,7 +82,7 @@ export class BookTreeItem extends vscode.TreeItem {
|
|||||||
}
|
}
|
||||||
this._rootContentPath = getContentPath(this.book.version, this.book.root, '');
|
this._rootContentPath = getContentPath(this.book.version, this.book.root, '');
|
||||||
this.tooltip = this.book.type === BookTreeItemType.Book ? this._rootContentPath : this.book.contentPath;
|
this.tooltip = this.book.type === BookTreeItemType.Book ? this._rootContentPath : this.book.contentPath;
|
||||||
this.resourceUri = vscode.Uri.file(this.book.root);
|
this.resourceUri = this.book.type === BookTreeItemType.Book ? vscode.Uri.file(this.book.root) : vscode.Uri.file(this.book.contentPath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -291,7 +291,7 @@ export class NotebookExplorerViewPaneContainer extends ViewPaneContainer {
|
|||||||
filesToIncludeFiltered = filesToIncludeFiltered + path.join(folderToSearch.folder.fsPath, '**', '*.md') + ',' + path.join(folderToSearch.folder.fsPath, '**', '*.ipynb') + ',';
|
filesToIncludeFiltered = filesToIncludeFiltered + path.join(folderToSearch.folder.fsPath, '**', '*.md') + ',' + path.join(folderToSearch.folder.fsPath, '**', '*.ipynb') + ',';
|
||||||
} else {
|
} else {
|
||||||
let pattern = {};
|
let pattern = {};
|
||||||
let rootFolder = URI.file(root.resourceUri.path);
|
let rootFolder = URI.file(path.dirname(root.resourceUri.path));
|
||||||
let pathToNotebook = isString(root.tooltip) ? root.tooltip : root.tooltip.value;
|
let pathToNotebook = isString(root.tooltip) ? root.tooltip : root.tooltip.value;
|
||||||
let baseName = path.join('**', path.basename(pathToNotebook));
|
let baseName = path.join('**', path.basename(pathToNotebook));
|
||||||
pattern[baseName] = true;
|
pattern[baseName] = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user