mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-16 01:25:36 -05:00
Add basic structure for publish project quickpick (#16008)
* Add basic structure for publish project quickpick * fixes * feedback
This commit is contained in:
@@ -57,7 +57,7 @@ export class PublishDatabaseDialog {
|
||||
|
||||
public openDialog(): void {
|
||||
this.initializeDialog();
|
||||
this.dialog.okButton.label = constants.publishDialogOkButtonText;
|
||||
this.dialog.okButton.label = constants.publish;
|
||||
this.dialog.okButton.enabled = false;
|
||||
this.toDispose.push(this.dialog.okButton.onClick(async () => await this.publishClick()));
|
||||
|
||||
@@ -536,17 +536,7 @@ export class PublishDatabaseDialog {
|
||||
}).component();
|
||||
|
||||
loadProfileButton.onDidClick(async () => {
|
||||
const fileUris = await vscode.window.showOpenDialog(
|
||||
{
|
||||
canSelectFiles: true,
|
||||
canSelectFolders: false,
|
||||
canSelectMany: false,
|
||||
defaultUri: vscode.Uri.file(this.project.projectFolderPath),
|
||||
filters: {
|
||||
[constants.publishSettingsFiles]: ['publish.xml']
|
||||
}
|
||||
}
|
||||
);
|
||||
const fileUris = await promptForPublishProfile(this.project.projectFolderPath);
|
||||
|
||||
if (!fileUris || fileUris.length === 0) {
|
||||
return;
|
||||
@@ -628,3 +618,17 @@ export class PublishDatabaseDialog {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
export function promptForPublishProfile(defaultPath: string): Thenable<vscode.Uri[] | undefined> {
|
||||
return vscode.window.showOpenDialog(
|
||||
{
|
||||
canSelectFiles: true,
|
||||
canSelectFolders: false,
|
||||
canSelectMany: false,
|
||||
defaultUri: vscode.Uri.file(defaultPath),
|
||||
filters: {
|
||||
[constants.publishSettingsFiles]: ['publish.xml']
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user