Update button texts for Create New project and Open existing project UIs (#14900)

This commit is contained in:
Sakshi Sharma
2021-03-29 16:45:08 -07:00
committed by GitHub
parent 896d0b0ea1
commit 69361b5c97
4 changed files with 6 additions and 4 deletions

View File

@@ -24,9 +24,9 @@ export abstract class DialogBase {
public workspaceInputBox: azdata.InputBoxComponent | undefined;
protected workspaceInputFormComponent: azdata.FormComponent | undefined;
constructor(dialogTitle: string, dialogName: string, dialogWidth: azdata.window.DialogWidth = 600) {
constructor(dialogTitle: string, dialogName: string, okButtonText: string, dialogWidth: azdata.window.DialogWidth = 600) {
this.dialogObject = azdata.window.createModelViewDialog(dialogTitle, dialogName, dialogWidth);
this.dialogObject.okButton.label = constants.OkButtonText;
this.dialogObject.okButton.label = okButtonText;
this.register(this.dialogObject.cancelButton.onClick(() => this.onCancelButtonClicked()));
this.register(this.dialogObject.okButton.onClick(() => this.onOkButtonClicked()));
this.dialogObject.registerCloseValidator(async () => {

View File

@@ -25,7 +25,7 @@ export class NewProjectDialog extends DialogBase {
public model: NewProjectDialogModel = new NewProjectDialogModel();
constructor(private workspaceService: IWorkspaceService) {
super(constants.NewProjectDialogTitle, 'NewProject');
super(constants.NewProjectDialogTitle, 'NewProject', constants.CreateButtonText);
// dialog launched from Welcome message button (only visible when no current workspace) vs. "add project" button
TelemetryReporter.createActionEvent(TelemetryViews.NewProjectDialog, TelemetryActions.NewProjectDialogLaunched)

View File

@@ -37,7 +37,7 @@ export class OpenExistingDialog extends DialogBase {
];
constructor(private workspaceService: IWorkspaceService, private extensionContext: vscode.ExtensionContext) {
super(constants.OpenExistingDialogTitle, 'OpenProject');
super(constants.OpenExistingDialogTitle, 'OpenProject', constants.OpenButtonText);
// dialog launched from Welcome message button (only visible when no current workspace) vs. "add project" button
TelemetryReporter.createActionEvent(TelemetryViews.OpenExistingDialog, TelemetryActions.OpenExistingDialogLaunched)