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)}`;
|
return `${repositoryUrl}${queryStringPrefix}title=${encodeURIComponent(issueTitle)}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,8 +28,9 @@ export interface ITemplateData {
|
|||||||
element: HTMLElement;
|
element: HTMLElement;
|
||||||
icon: HTMLImageElement;
|
icon: HTMLImageElement;
|
||||||
name: HTMLElement;
|
name: HTMLElement;
|
||||||
installCount: HTMLElement;
|
// {{SQL CARBON EDIT}}
|
||||||
ratings: HTMLElement;
|
//installCount: HTMLElement;
|
||||||
|
//ratings: HTMLElement;
|
||||||
author: HTMLElement;
|
author: HTMLElement;
|
||||||
description: HTMLElement;
|
description: HTMLElement;
|
||||||
extension: IExtension;
|
extension: IExtension;
|
||||||
@@ -103,16 +104,19 @@ export class Renderer implements IPagedRenderer<IExtension, ITemplateData> {
|
|||||||
const reloadAction = this.instantiationService.createInstance(ReloadAction);
|
const reloadAction = this.instantiationService.createInstance(ReloadAction);
|
||||||
const manageAction = this.instantiationService.createInstance(ManageExtensionAction);
|
const manageAction = this.instantiationService.createInstance(ManageExtensionAction);
|
||||||
|
|
||||||
|
// {{SQL CARBON EDIT}}
|
||||||
actionbar.push([updateAction, reloadAction, installAction, disabledStatusAction, maliciousStatusAction, manageAction], actionOptions);
|
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 {
|
return {
|
||||||
root, element, icon, name, installCount, ratings, author, description, disposables,
|
// {{SQL CARBON EDIT}}
|
||||||
|
root, element, icon, name, /*installCount, ratings,*/ author, description, disposables,
|
||||||
extensionDisposables: [],
|
extensionDisposables: [],
|
||||||
set extension(extension: IExtension) {
|
set extension(extension: IExtension) {
|
||||||
versionWidget.extension = extension;
|
versionWidget.extension = extension;
|
||||||
installCountWidget.extension = extension;
|
// {{SQL CARBON EDIT}}
|
||||||
ratingsWidget.extension = extension;
|
//installCountWidget.extension = extension;
|
||||||
|
//ratingsWidget.extension = extension;
|
||||||
maliciousStatusAction.extension = extension;
|
maliciousStatusAction.extension = extension;
|
||||||
disabledStatusAction.extension = extension;
|
disabledStatusAction.extension = extension;
|
||||||
installAction.extension = extension;
|
installAction.extension = extension;
|
||||||
@@ -132,8 +136,8 @@ export class Renderer implements IPagedRenderer<IExtension, ITemplateData> {
|
|||||||
data.name.textContent = '';
|
data.name.textContent = '';
|
||||||
data.author.textContent = '';
|
data.author.textContent = '';
|
||||||
data.description.textContent = '';
|
data.description.textContent = '';
|
||||||
data.installCount.style.display = 'none';
|
//data.installCount.style.display = 'none';
|
||||||
data.ratings.style.display = 'none';
|
//data.ratings.style.display = 'none';
|
||||||
data.extension = null;
|
data.extension = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -173,8 +177,9 @@ export class Renderer implements IPagedRenderer<IExtension, ITemplateData> {
|
|||||||
data.name.textContent = extension.displayName;
|
data.name.textContent = extension.displayName;
|
||||||
data.author.textContent = extension.publisherDisplayName;
|
data.author.textContent = extension.publisherDisplayName;
|
||||||
data.description.textContent = extension.description;
|
data.description.textContent = extension.description;
|
||||||
data.installCount.style.display = '';
|
// {{SQL CARBON EDIT}}
|
||||||
data.ratings.style.display = '';
|
//data.installCount.style.display = '';
|
||||||
|
//data.ratings.style.display = '';
|
||||||
data.extension = extension;
|
data.extension = extension;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -327,19 +327,22 @@ export class ExtensionEditor extends BaseEditor {
|
|||||||
.done(viewlet => viewlet.search(`publisher:"${extension.publisherDisplayName}"`));
|
.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 {
|
} else {
|
||||||
this.name.onclick = null;
|
this.name.onclick = null;
|
||||||
this.rating.onclick = null;
|
this.rating.onclick = null;
|
||||||
this.publisher.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) {
|
if (extension.repository) {
|
||||||
this.repository.onclick = finalHandler(() => window.open(extension.repository));
|
this.repository.onclick = finalHandler(() => window.open(extension.repository));
|
||||||
this.repository.style.display = 'initial';
|
this.repository.style.display = 'initial';
|
||||||
|
|||||||
Reference in New Issue
Block a user