mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
* Fixing the error order for Project dialog * Taking PR review comments and making the change for open project also
This commit is contained in:
@@ -34,9 +34,6 @@ export class NewProjectDialog extends DialogBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async validate(): Promise<boolean> {
|
async validate(): Promise<boolean> {
|
||||||
if (await this.workspaceService.validateWorkspace() === false) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
try {
|
try {
|
||||||
// the selected location should be an existing directory
|
// the selected location should be an existing directory
|
||||||
const parentDirectoryExists = await directoryExist(this.model.location);
|
const parentDirectoryExists = await directoryExist(this.model.location);
|
||||||
@@ -52,6 +49,9 @@ export class NewProjectDialog extends DialogBase {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (await this.workspaceService.validateWorkspace() === false) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
|
|||||||
@@ -35,15 +35,15 @@ export class OpenExistingDialog extends DialogBase {
|
|||||||
|
|
||||||
async validate(): Promise<boolean> {
|
async validate(): Promise<boolean> {
|
||||||
try {
|
try {
|
||||||
if (await this.workspaceService.validateWorkspace() === false) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.localRadioButton?.checked) {
|
if (this.localRadioButton?.checked) {
|
||||||
await this.validateFile(this.filePathTextBox!.value!, constants.Project.toLowerCase());
|
await this.validateFile(this.filePathTextBox!.value!, constants.Project.toLowerCase());
|
||||||
} else {
|
} else {
|
||||||
await this.validateClonePath(<string>this.localClonePathTextBox!.value);
|
await this.validateClonePath(<string>this.localClonePathTextBox!.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (await this.workspaceService.validateWorkspace() === false) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
|
|||||||
Reference in New Issue
Block a user