Skip to content

Commit

Permalink
remove download all badge in detail page
Browse files Browse the repository at this point in the history
  • Loading branch information
ytshen committed Jan 17, 2025
1 parent ed275fc commit 58af59a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
2 changes: 0 additions & 2 deletions addon/content/addonDetail.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@
style="vertical-align: middle; height: 100%; object-fit: contain; object-position: left; margin: 1px;" />
<img id="download-latest-count-icon"
style="vertical-align: middle; height: 100%; object-fit: contain; object-position: left; margin: 1px;" />
<img id="download-all-count-icon"
style="vertical-align: middle; height: 100%; object-fit: contain; object-position: left; margin: 1px;" />
<img id="release-time-icon"
style="vertical-align: middle; height: 100%; object-fit: contain; object-position: left; margin: 1px;" />
</div>
Expand Down
14 changes: 7 additions & 7 deletions src/modules/addonDetail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,6 @@ export class AddonInfoDetail {
starIcon.src = `https://img.shields.io/github/stars/${addonInfo.repo}?label=${getString('menu-star')}`;
const downloadLatestCountIcon = win.document.querySelector("#download-latest-count-icon") as HTMLImageElement;
downloadLatestCountIcon.src = tagName ? `https://img.shields.io/github/downloads/${addonInfo.repo}/${tagName!}/total?label=${getString('menu-download-latest-count')}` : "";
const downloadAllCountIcon = win.document.querySelector("#download-all-count-icon") as HTMLImageElement;
downloadAllCountIcon.src = tagName ? `https://img.shields.io/github/downloads/${addonInfo.repo}/total?label=${getString('menu-download-all-count')}` : "";
const remoteVersionIcon = win.document.querySelector("#remote-version-icon") as HTMLImageElement;
remoteVersionIcon.src = `https://img.shields.io/badge/${getString('menu-remote-version')}-${version?.replace('-', '--') ?? getString('unknown')}-orange`;
const localVersionIcon = win.document.querySelector("#local-version-icon") as HTMLImageElement;
Expand All @@ -209,11 +207,13 @@ export class AddonInfoDetail {
if (releaseInfo?.minZoteroVersion && releaseInfo.maxZoteroVersion) {
if (Services.vc.compare(Zotero.version, releaseInfo.minZoteroVersion.replace('*', '0')) < 0 || Services.vc.compare(Zotero.version, releaseInfo.maxZoteroVersion.replace('*', '999')) > 0) {
this.uncompatibleDescription.hidden = false;
this.uncompatibleDescription.textContent = getString('release-uncompatible-description', { args: {
minVersion: releaseInfo.minZoteroVersion,
maxVersion: releaseInfo.maxZoteroVersion,
currentVersion: Zotero.version,
}});
this.uncompatibleDescription.textContent = getString('release-uncompatible-description', {
args: {
minVersion: releaseInfo.minZoteroVersion,
maxVersion: releaseInfo.maxZoteroVersion,
currentVersion: Zotero.version,
}
});
}
}

Expand Down

0 comments on commit 58af59a

Please sign in to comment.