mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Pinning Notebooks on Notebooks view (#11963)
* initial commit * added tests * code cleanup and more tests * add missed util test * changes to address comments * remove pin from resources
This commit is contained in:
@@ -8,6 +8,7 @@ import * as path from 'path';
|
||||
import * as fs from 'fs';
|
||||
import { IJupyterBookSection, IJupyterBookToc } from '../contracts/content';
|
||||
import * as loc from '../common/localizedConstants';
|
||||
import { isBookItemPinned } from '../common/utils';
|
||||
|
||||
export enum BookTreeItemType {
|
||||
Book = 'Book',
|
||||
@@ -54,6 +55,8 @@ export class BookTreeItem extends vscode.TreeItem {
|
||||
} else {
|
||||
this.contextValue = 'savedNotebook';
|
||||
}
|
||||
} else {
|
||||
this.contextValue = book.type === BookTreeItemType.Notebook ? (isBookItemPinned(book.contentPath) ? 'pinnedNotebook' : 'savedNotebook') : 'section';
|
||||
}
|
||||
this.setPageVariables();
|
||||
this.setCommand();
|
||||
|
||||
Reference in New Issue
Block a user