mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-04 17:23:45 -05:00
Create book UI (#14210)
* Add dialog for creating books * create empty book * add localized constants * add validation to dialog * reset the create book command to original * address pr comments * change error message * Init book toc manager in bookTreeView
This commit is contained in:
@@ -11,6 +11,8 @@ import * as vscode from 'vscode';
|
||||
import * as azdata from 'azdata';
|
||||
import * as crypto from 'crypto';
|
||||
import { notebookLanguages, notebookConfigKey, pinnedBooksConfigKey, AUTHTYPE, INTEGRATED_AUTH, KNOX_ENDPOINT_PORT, KNOX_ENDPOINT_SERVER } from './constants';
|
||||
import { IPrompter, IQuestion, QuestionTypes } from '../prompts/question';
|
||||
import * as loc from '../common/localizedConstants';
|
||||
|
||||
const localize = nls.loadMessageBundle();
|
||||
|
||||
@@ -390,3 +392,12 @@ export interface IBookNotebook {
|
||||
bookPath?: string;
|
||||
notebookPath: string;
|
||||
}
|
||||
|
||||
//Confirmation message dialog
|
||||
export async function confirmReplace(prompter: IPrompter): Promise<boolean> {
|
||||
return await prompter.promptSingle<boolean>(<IQuestion>{
|
||||
type: QuestionTypes.confirm,
|
||||
message: loc.confirmReplace,
|
||||
default: false
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user