mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
fixed the issue with displaying licenses (#1610)
This commit is contained in:
@@ -771,7 +771,8 @@ export class IssueReporter extends Disposable {
|
||||
}
|
||||
}
|
||||
|
||||
const queryStringPrefix = product.reportIssueUrl.indexOf('?') === -1 ? '?' : '&';
|
||||
// {{SQL CARBON EDIT}}
|
||||
const queryStringPrefix = repositoryUrl.indexOf('?') === -1 ? '?' : '&';
|
||||
return `${repositoryUrl}${queryStringPrefix}title=${encodeURIComponent(issueTitle)}`;
|
||||
}
|
||||
|
||||
|
||||
@@ -28,8 +28,9 @@ export interface ITemplateData {
|
||||
element: HTMLElement;
|
||||
icon: HTMLImageElement;
|
||||
name: HTMLElement;
|
||||
installCount: HTMLElement;
|
||||
ratings: HTMLElement;
|
||||
// {{SQL CARBON EDIT}}
|
||||
//installCount: HTMLElement;
|
||||
//ratings: HTMLElement;
|
||||
author: HTMLElement;
|
||||
description: HTMLElement;
|
||||
extension: IExtension;
|
||||
@@ -103,16 +104,19 @@ export class Renderer implements IPagedRenderer<IExtension, ITemplateData> {
|
||||
const reloadAction = this.instantiationService.createInstance(ReloadAction);
|
||||
const manageAction = this.instantiationService.createInstance(ManageExtensionAction);
|
||||
|
||||
// {{SQL CARBON EDIT}}
|
||||
actionbar.push([updateAction, reloadAction, installAction, disabledStatusAction, maliciousStatusAction, manageAction], actionOptions);
|
||||
const disposables = [versionWidget, installCountWidget, ratingsWidget, maliciousStatusAction, disabledStatusAction, updateAction, reloadAction, manageAction, actionbar, bookmarkStyler];
|
||||
const disposables = [versionWidget, /*installCountWidget, ratingsWidget*/, maliciousStatusAction, disabledStatusAction, updateAction, reloadAction, manageAction, actionbar, bookmarkStyler];
|
||||
|
||||
return {
|
||||
root, element, icon, name, installCount, ratings, author, description, disposables,
|
||||
// {{SQL CARBON EDIT}}
|
||||
root, element, icon, name, /*installCount, ratings,*/ author, description, disposables,
|
||||
extensionDisposables: [],
|
||||
set extension(extension: IExtension) {
|
||||
versionWidget.extension = extension;
|
||||
installCountWidget.extension = extension;
|
||||
ratingsWidget.extension = extension;
|
||||
// {{SQL CARBON EDIT}}
|
||||
//installCountWidget.extension = extension;
|
||||
//ratingsWidget.extension = extension;
|
||||
maliciousStatusAction.extension = extension;
|
||||
disabledStatusAction.extension = extension;
|
||||
installAction.extension = extension;
|
||||
@@ -132,8 +136,8 @@ export class Renderer implements IPagedRenderer<IExtension, ITemplateData> {
|
||||
data.name.textContent = '';
|
||||
data.author.textContent = '';
|
||||
data.description.textContent = '';
|
||||
data.installCount.style.display = 'none';
|
||||
data.ratings.style.display = 'none';
|
||||
//data.installCount.style.display = 'none';
|
||||
//data.ratings.style.display = 'none';
|
||||
data.extension = null;
|
||||
}
|
||||
|
||||
@@ -173,8 +177,9 @@ export class Renderer implements IPagedRenderer<IExtension, ITemplateData> {
|
||||
data.name.textContent = extension.displayName;
|
||||
data.author.textContent = extension.publisherDisplayName;
|
||||
data.description.textContent = extension.description;
|
||||
data.installCount.style.display = '';
|
||||
data.ratings.style.display = '';
|
||||
// {{SQL CARBON EDIT}}
|
||||
//data.installCount.style.display = '';
|
||||
//data.ratings.style.display = '';
|
||||
data.extension = extension;
|
||||
}
|
||||
|
||||
|
||||
@@ -327,19 +327,22 @@ export class ExtensionEditor extends BaseEditor {
|
||||
.done(viewlet => viewlet.search(`publisher:"${extension.publisherDisplayName}"`));
|
||||
});
|
||||
|
||||
if (extension.licenseUrl) {
|
||||
this.license.onclick = finalHandler(() => window.open(extension.licenseUrl));
|
||||
this.license.style.display = 'initial';
|
||||
} else {
|
||||
this.license.onclick = null;
|
||||
this.license.style.display = 'none';
|
||||
}
|
||||
|
||||
} else {
|
||||
this.name.onclick = null;
|
||||
this.rating.onclick = null;
|
||||
this.publisher.onclick = null;
|
||||
}
|
||||
|
||||
// {{SQL CARBON EDIT}}
|
||||
if (extension.licenseUrl) {
|
||||
this.license.onclick = finalHandler(() => window.open(extension.licenseUrl));
|
||||
this.license.style.display = 'initial';
|
||||
} else {
|
||||
this.license.onclick = null;
|
||||
this.license.style.display = 'none';
|
||||
}
|
||||
|
||||
if (extension.repository) {
|
||||
this.repository.onclick = finalHandler(() => window.open(extension.repository));
|
||||
this.repository.style.display = 'initial';
|
||||
|
||||
Reference in New Issue
Block a user