mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Update dacpac wizard to use folder icon (#14290)
* change dacpac extension to use folder icon instead of ... on buttons * make folder icon more centered * fix tests
This commit is contained in:
@@ -8,7 +8,7 @@ import * as vscode from 'vscode';
|
||||
import { DataTierApplicationWizard } from './wizard/dataTierApplicationWizard';
|
||||
|
||||
export async function activate(context: vscode.ExtensionContext) {
|
||||
vscode.commands.registerCommand('dacFx.start', (profile: azdata.IConnectionProfile, ...args: any[]) => new DataTierApplicationWizard().start(profile, args));
|
||||
vscode.commands.registerCommand('dacFx.start', (profile: azdata.IConnectionProfile) => new DataTierApplicationWizard(undefined, context).start(profile));
|
||||
}
|
||||
|
||||
export function deactivate(): void {
|
||||
|
||||
@@ -118,15 +118,13 @@ export function createViewContext(): ViewTestContext {
|
||||
let buttonBuilder: azdata.ComponentBuilder<azdata.ButtonComponent, azdata.ButtonProperties> = {
|
||||
component: () => button,
|
||||
withProperties: (properties: any) => {
|
||||
if ((properties as any).label === '•••') {
|
||||
button.label = '•••';
|
||||
if ((properties as any).title === loc.selectFile) {
|
||||
button.onDidClick = fileButtonOnClick.event;
|
||||
}
|
||||
return buttonBuilder;
|
||||
},
|
||||
withProps: (properties) => {
|
||||
if ((properties as any).label === '•••') {
|
||||
button.label = '•••';
|
||||
if ((properties as any).title === loc.selectFile) {
|
||||
button.onDidClick = fileButtonOnClick.event;
|
||||
}
|
||||
return buttonBuilder;
|
||||
|
||||
@@ -182,10 +182,9 @@ export abstract class DacFxConfigPage extends BasePage {
|
||||
|
||||
this.fileTextBox.ariaLabel = loc.fileLocation;
|
||||
this.fileButton = this.view.modelBuilder.button().withProps({
|
||||
label: '•••',
|
||||
title: loc.selectFile,
|
||||
ariaLabel: loc.selectFile,
|
||||
secondary: true
|
||||
iconPath: path.join(this.instance.extensionContextExtensionPath, 'images', 'folder.svg'),
|
||||
}).component();
|
||||
}
|
||||
|
||||
|
||||
@@ -85,13 +85,15 @@ export class DataTierApplicationWizard {
|
||||
public model: DacFxDataModel;
|
||||
public pages: Map<string, Page> = new Map<string, Page>();
|
||||
public selectedOperation: Operation;
|
||||
public extensionContextExtensionPath: string;
|
||||
|
||||
constructor(dacfxInputService?: mssql.IDacFxService) {
|
||||
constructor(dacfxInputService?: mssql.IDacFxService, extensionContext?: vscode.ExtensionContext) {
|
||||
this.wizard = azdata.window.createWizard(loc.wizardTitle, 'Data Tier Application Wizard');
|
||||
this.dacfxService = dacfxInputService;
|
||||
this.extensionContextExtensionPath = extensionContext?.extensionPath ?? '';
|
||||
}
|
||||
|
||||
public async start(p: any, ...args: any[]): Promise<boolean> {
|
||||
public async start(p: any): Promise<boolean> {
|
||||
this.model = <DacFxDataModel>{};
|
||||
|
||||
let profile = p ? <azdata.IConnectionProfile>p.connectionProfile : undefined;
|
||||
|
||||
Reference in New Issue
Block a user