Fix #127781
This commit is contained in:
parent
74f7cc94e8
commit
355880492e
2 changed files with 23 additions and 29 deletions
|
@ -231,23 +231,13 @@ export class ExtensionEditor extends EditorPane {
|
|||
|
||||
const subtitle = append(details, $('.subtitle'));
|
||||
const publisher = append(append(subtitle, $('.subtitle-entry')), $('span.publisher.clickable', { title: localize('publisher', "Publisher name"), tabIndex: 0 }));
|
||||
|
||||
const installCount = append(append(subtitle, $('.subtitle-entry')), $('span.install', { title: localize('install count', "Install count"), tabIndex: 0 }));
|
||||
|
||||
const rating = append(append(subtitle, $('.subtitle-entry')), $('span.rating.clickable', { title: localize('rating', "Rating"), tabIndex: 0 }));
|
||||
|
||||
const repository = append(append(subtitle, $('.subtitle-entry')), $('span.repository.clickable'));
|
||||
const repository = append(append(subtitle, $('.subtitle-entry')), $('span.repository.clickable', { tabIndex: 0 }));
|
||||
repository.textContent = localize('repository', 'Repository');
|
||||
repository.style.display = 'none';
|
||||
repository.tabIndex = 0;
|
||||
|
||||
const license = append(append(subtitle, $('.subtitle-entry')), $('span.license.clickable'));
|
||||
const license = append(append(subtitle, $('.subtitle-entry')), $('span.license.clickable', { tabIndex: 0 }));
|
||||
license.textContent = localize('license', 'License');
|
||||
license.style.display = 'none';
|
||||
license.tabIndex = 0;
|
||||
|
||||
const version = append(append(subtitle, $('.subtitle-entry')), $('span.version'));
|
||||
version.textContent = localize('version', 'Version');
|
||||
const version = append(append(subtitle, $('.subtitle-entry')), $('span.version', { title: localize('version', 'Version'), tabIndex: 0 }));
|
||||
|
||||
const description = append(details, $('.description'));
|
||||
|
||||
|
@ -356,8 +346,6 @@ export class ExtensionEditor extends EditorPane {
|
|||
template.preview.style.display = extension.preview ? 'inherit' : 'none';
|
||||
template.builtin.style.display = extension.isBuiltin ? 'inherit' : 'none';
|
||||
|
||||
template.publisher.textContent = extension.publisherDisplayName;
|
||||
template.version.textContent = `v${extension.version}`;
|
||||
template.description.textContent = extension.description;
|
||||
|
||||
const extRecommendations = this.extensionRecommendationsService.getAllRecommendationsWithReason();
|
||||
|
@ -377,8 +365,24 @@ export class ExtensionEditor extends EditorPane {
|
|||
this.telemetryService.publicLog('extensionGallery:openExtension', { ...extension.telemetryData, ...recommendationsData });
|
||||
|
||||
template.name.classList.toggle('clickable', !!extension.url);
|
||||
|
||||
// subtitle
|
||||
template.publisher.textContent = extension.publisherDisplayName;
|
||||
template.publisher.classList.toggle('clickable', !!extension.url);
|
||||
|
||||
template.installCount.parentElement?.classList.toggle('hide', !extension.url);
|
||||
|
||||
template.rating.parentElement?.classList.toggle('hide', !extension.url);
|
||||
template.rating.classList.toggle('clickable', !!extension.url);
|
||||
|
||||
template.repository.parentElement?.classList.toggle('hide', !extension.repository);
|
||||
if (extension.repository) {
|
||||
this.transientDisposables.add(this.onClick(template.repository, () => this.openerService.open(URI.parse(extension.repository!))));
|
||||
}
|
||||
|
||||
template.license.parentElement?.classList.toggle('hide', !extension.url || !extension.licenseUrl);
|
||||
template.version.textContent = `v${extension.version}`;
|
||||
|
||||
if (extension.url) {
|
||||
this.transientDisposables.add(this.onClick(template.name, () => this.openerService.open(URI.parse(extension.url!))));
|
||||
this.transientDisposables.add(this.onClick(template.rating, () => this.openerService.open(URI.parse(`${extension.url}#review-details`))));
|
||||
|
@ -387,23 +391,9 @@ export class ExtensionEditor extends EditorPane {
|
|||
.then(viewlet => viewlet?.getViewPaneContainer() as IExtensionsViewPaneContainer)
|
||||
.then(viewlet => viewlet.search(`publisher:"${extension.publisherDisplayName}"`));
|
||||
}));
|
||||
|
||||
if (extension.licenseUrl) {
|
||||
this.transientDisposables.add(this.onClick(template.license, () => this.openerService.open(URI.parse(extension.licenseUrl!))));
|
||||
template.license.style.display = 'initial';
|
||||
} else {
|
||||
template.license.style.display = 'none';
|
||||
}
|
||||
} else {
|
||||
template.license.style.display = 'none';
|
||||
}
|
||||
|
||||
if (extension.repository) {
|
||||
this.transientDisposables.add(this.onClick(template.repository, () => this.openerService.open(URI.parse(extension.repository!))));
|
||||
template.repository.style.display = 'initial';
|
||||
}
|
||||
else {
|
||||
template.repository.style.display = 'none';
|
||||
}
|
||||
|
||||
const widgets = [
|
||||
|
|
|
@ -112,6 +112,10 @@
|
|||
line-height: 20px;
|
||||
}
|
||||
|
||||
.extension-editor > .header > .details > .subtitle .hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.extension-editor > .header > .details > .subtitle .publisher {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue