mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Add separate config for enabling nb convert and fix css (#11811)
This commit is contained in:
@@ -120,7 +120,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.carbon-taskbar .codicon.export {
|
.carbon-taskbar .codicon.export {
|
||||||
background-origin: initial;
|
background-origin: initial !important;
|
||||||
background-position: left;
|
background-position: left !important;
|
||||||
background-size: 11px
|
background-size: 11px !important;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -210,15 +210,12 @@ configurationRegistry.registerConfiguration({
|
|||||||
'type': 'boolean',
|
'type': 'boolean',
|
||||||
'default': false,
|
'default': false,
|
||||||
'description': localize('notebook.showAllKernels', "(Preview) show all kernels for the current notebook provider.")
|
'description': localize('notebook.showAllKernels', "(Preview) show all kernels for the current notebook provider.")
|
||||||
}
|
},
|
||||||
}
|
'notebook.showNotebookConvertActions': {
|
||||||
});
|
'type': 'boolean',
|
||||||
|
'default': false,
|
||||||
configurationRegistry.registerConfiguration({
|
'description': localize('notebook.showNotebookConvertActions', "(Preview) Show buttons for converting a Notebook to and from SQL.")
|
||||||
'id': 'notebook',
|
},
|
||||||
'title': 'Notebook',
|
|
||||||
'type': 'object',
|
|
||||||
'properties': {
|
|
||||||
'notebook.allowAzureDataStudioCommands': {
|
'notebook.allowAzureDataStudioCommands': {
|
||||||
'type': 'boolean',
|
'type': 'boolean',
|
||||||
'default': false,
|
'default': false,
|
||||||
|
|||||||
@@ -259,6 +259,7 @@ export class QueryEditor extends BaseEditor {
|
|||||||
const separator = Taskbar.createTaskbarSeparator();
|
const separator = Taskbar.createTaskbarSeparator();
|
||||||
let content: ITaskbarContent[];
|
let content: ITaskbarContent[];
|
||||||
const previewFeaturesEnabled = this.configurationService.getValue('workbench')['enablePreviewFeatures'];
|
const previewFeaturesEnabled = this.configurationService.getValue('workbench')['enablePreviewFeatures'];
|
||||||
|
const notebookConvertActionsEnabled = this.configurationService.getValue('notebook')['showNotebookConvertActions'];
|
||||||
if (previewFeaturesEnabled) {
|
if (previewFeaturesEnabled) {
|
||||||
content = [
|
content = [
|
||||||
{ action: this._runQueryAction },
|
{ action: this._runQueryAction },
|
||||||
@@ -270,8 +271,11 @@ export class QueryEditor extends BaseEditor {
|
|||||||
{ element: separator },
|
{ element: separator },
|
||||||
{ action: this._estimatedQueryPlanAction }, // Preview
|
{ action: this._estimatedQueryPlanAction }, // Preview
|
||||||
{ action: this._toggleSqlcmdMode }, // Preview
|
{ action: this._toggleSqlcmdMode }, // Preview
|
||||||
{ action: this._exportAsNotebookAction } // Preview
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
if (notebookConvertActionsEnabled) {
|
||||||
|
content.push({ action: this._exportAsNotebookAction });
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
content = [
|
content = [
|
||||||
{ action: this._runQueryAction },
|
{ action: this._runQueryAction },
|
||||||
@@ -281,6 +285,12 @@ export class QueryEditor extends BaseEditor {
|
|||||||
{ action: this._changeConnectionAction },
|
{ action: this._changeConnectionAction },
|
||||||
{ action: this._listDatabasesAction }
|
{ action: this._listDatabasesAction }
|
||||||
];
|
];
|
||||||
|
const notebookConvertActionsEnabled = this.configurationService.getValue('notebook')['notebook.showNotebookConvertActions'];
|
||||||
|
if (notebookConvertActionsEnabled) {
|
||||||
|
content.push(
|
||||||
|
{ element: separator },
|
||||||
|
{ action: this._exportAsNotebookAction });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.taskbar.setContent(content);
|
this.taskbar.setContent(content);
|
||||||
|
|||||||
Reference in New Issue
Block a user