add learn more link for sdk style in create project from db dialog (#18637)

This commit is contained in:
Kim Santiago
2022-03-04 13:00:21 -08:00
committed by GitHub
parent 9a944b614d
commit 9e3d678536
3 changed files with 14 additions and 3 deletions

View File

@@ -93,6 +93,7 @@ export const defaultProjectNameStarter = localize('defaultProjectNameStarter', "
export const location = localize('location', "Location");
export const reloadProject = localize('reloadProject', "Would you like to reload your database project?");
export const learnMore = localize('learnMore', "Learn More");
export const sdkLearnMoreUrl = 'https://github.com/microsoft/DacFx/tree/main/src/Microsoft.Build.Sql';
export function newObjectNamePrompt(objectType: string) { return localize('newObjectNamePrompt', 'New {0} name:', objectType); }
export function deleteConfirmation(toDelete: string) { return localize('deleteConfirmation', "Are you sure you want to delete {0}?", toDelete); }
export function deleteConfirmationContents(toDelete: string) { return localize('deleteConfirmationContents', "Are you sure you want to delete {0} and all of its contents?", toDelete); }
@@ -159,7 +160,7 @@ export const valueCannotBeEmpty = localize('valueCannotBeEmpty', "Value cannot b
export const dockerImageLabelPrefix = 'source=sqldbproject';
export const dockerImageNamePrefix = 'sqldbproject';
//
// Publish to Container
export const eulaAgreementTemplate = localize({ key: 'eulaAgreementTemplate', comment: ['The placeholders are contents of the line and should not be translated.'] }, "I accept the {0}.");
export function eulaAgreementText(name: string) { return localize({ key: 'eulaAgreementText', comment: ['The placeholders are contents of the line and should not be translated.'] }, "I accept the {0}.", name); }
export const eulaAgreementTitle = localize('eulaAgreementTitle', "Microsoft SQL Server License Agreement");

View File

@@ -92,6 +92,16 @@ export class CreateProjectFromDatabaseDialog {
label: constants.sdkStyleProject
}).component();
const sdkLearnMore = view.modelBuilder.hyperlink().withProps({
label: constants.learnMore,
url: constants.sdkLearnMoreUrl
}).component();
const sdkFormComponentGroup = view.modelBuilder.flexContainer()
.withLayout({ flexFlow: 'row', alignItems: 'baseline' })
.withItems([this.sdkStyleCheckbox, sdkLearnMore], { CSSStyles: { flex: '0 0 auto', 'margin-right': '10px' } })
.component();
this.formBuilder = <azdataType.FormBuilder>view.modelBuilder.formContainer()
.withFormItems([
{
@@ -117,7 +127,7 @@ export class CreateProjectFromDatabaseDialog {
component: createProjectSettingsFormSection,
},
{
component: this.sdkStyleCheckbox
component: sdkFormComponentGroup
}
]
}

View File

@@ -44,7 +44,7 @@ export class SqlDatabaseProjectProvider implements dataworkspace.IProjectProvide
targetPlatforms: Array.from(constants.targetPlatformToVersion.keys()),
defaultTargetPlatform: constants.defaultTargetPlatform,
linkDisplayValue: constants.learnMore,
linkLocation: 'https://github.com/microsoft/DacFx/tree/main/src/Microsoft.Build.Sql'
linkLocation: constants.sdkLearnMoreUrl
},
{
id: constants.emptySqlDatabaseProjectTypeId,