mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-16 17:22:29 -05:00
Introduce Trust Book in Book Viewlet (#9414)
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as azdata from 'azdata';
|
||||
|
||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { ok } from 'vs/base/common/assert';
|
||||
@@ -50,6 +49,7 @@ export class ExtHostNotebookDocumentData implements IDisposable {
|
||||
get cells() { return data._cells; },
|
||||
get kernelSpec() { return data._kernelSpec; },
|
||||
save() { return data._save(); },
|
||||
setTrusted(isTrusted) { data._setTrusted(isTrusted); },
|
||||
validateCellRange(range) { return data._validateRange(range); },
|
||||
};
|
||||
}
|
||||
@@ -61,7 +61,13 @@ export class ExtHostNotebookDocumentData implements IDisposable {
|
||||
return Promise.reject(new Error('Document has been closed'));
|
||||
}
|
||||
return this._proxy.$trySaveDocument(this._uri);
|
||||
}
|
||||
|
||||
private _setTrusted(isTrusted: boolean): Thenable<boolean> {
|
||||
if (this._isDisposed) {
|
||||
return Promise.reject(new Error('Document has been closed'));
|
||||
}
|
||||
return this._proxy.$trySetTrusted(this._uri, isTrusted);
|
||||
}
|
||||
|
||||
public onModelChanged(data: INotebookModelChangedData) {
|
||||
|
||||
Reference in New Issue
Block a user