Fix duplicate icon and user tag on page reload by adding class and duplicate check
All checks were successful
Build and Push Docker Image / build (push) Successful in 41s
Licence Check / Licence compatibility and copyright header verification (push) Successful in 50s
CI / Security audit (push) Successful in 1m28s
CI / Tests & coverage (push) Successful in 1m44s

This commit is contained in:
2026-05-20 00:29:44 +01:00
parent 73500751a0
commit ff7ace9f4f

View File

@@ -462,7 +462,7 @@ function updateDownloadCard(card, download) {
// Add new right-side container with user badge and logo
const header = card.querySelector('.download-header');
if (header) {
if (header && !header.querySelector('.download-header-right')) {
const rightSide = document.createElement('div');
rightSide.className = 'download-header-right';
@@ -490,7 +490,7 @@ function updateDownloadCard(card, download) {
if (download.client) {
const clientLogoWrapper = document.createElement('span');
clientLogoWrapper.className = 'download-client-logo-wrapper';
clientLogoWrapper.className = 'download-client-logo-wrapper download-card-logo-wrapper';
const clientLogo = document.createElement('img');
clientLogo.className = 'download-client-logo';