add objects dialog (#23243)

This commit is contained in:
Alan Ren
2023-05-30 09:53:44 -07:00
committed by GitHub
parent 82f5ef7ea3
commit f4d5ab616c
14 changed files with 250 additions and 60 deletions

View File

@@ -68,8 +68,8 @@ export abstract class ScriptableDialogBase<OptionsType extends ScriptableDialogO
await this.initializeUI();
}
protected override onLoadingStatusChanged(isLoading: boolean): void {
super.onLoadingStatusChanged(isLoading);
protected override updateLoadingStatus(isLoading: boolean): void {
super.updateLoadingStatus(isLoading);
this._helpButton.enabled = !isLoading;
this.dialogObject.okButton.enabled = this._scriptButton.enabled = isLoading ? false : this.isDirty;
}
@@ -80,7 +80,7 @@ export abstract class ScriptableDialogBase<OptionsType extends ScriptableDialogO
protected abstract generateScript(): Promise<string>;
private async onScriptButtonClick(): Promise<void> {
this.onLoadingStatusChanged(true);
this.updateLoadingStatus(true);
try {
const isValid = await this.runValidation();
if (!isValid) {
@@ -104,7 +104,7 @@ export abstract class ScriptableDialogBase<OptionsType extends ScriptableDialogO
level: azdata.window.MessageLevel.Error
};
} finally {
this.onLoadingStatusChanged(false);
this.updateLoadingStatus(false);
}
}
}