feat: multi-tag badges for showAll — amber for unmatched, accent for matched
All checks were successful
Build and Push Docker Image / build (push) Successful in 27s
All checks were successful
Build and Push Docker Image / build (push) Successful in 27s
- server: add extractAllTags() returning all tag labels for a series/movie - server: showAll now includes items with ANY tag (not just user-matched); non-admin path unchanged (must match current user's tag) - server: replace userTag with allTags[] + matchedUserTag on every download object - frontend: render all tags in header; unmatched tags amber (left), matched user tag in accent colour (rightmost); only visible in showAll mode - css: add --unmatched-tag-bg/color variables to all three themes (light, dark, mono) and .download-user-badge.unmatched style
This commit is contained in:
@@ -434,11 +434,20 @@ function createDownloadCard(download) {
|
||||
infoDiv.appendChild(movie);
|
||||
}
|
||||
|
||||
if (showAll && download.userTag) {
|
||||
const userBadge = document.createElement('span');
|
||||
userBadge.className = 'download-user-badge';
|
||||
userBadge.textContent = download.userTag;
|
||||
header.appendChild(userBadge);
|
||||
if (showAll && download.allTags && download.allTags.length > 0) {
|
||||
const unmatchedTags = download.allTags.filter(t => t !== download.matchedUserTag);
|
||||
for (const tag of unmatchedTags) {
|
||||
const badge = document.createElement('span');
|
||||
badge.className = 'download-user-badge unmatched';
|
||||
badge.textContent = tag;
|
||||
header.appendChild(badge);
|
||||
}
|
||||
if (download.matchedUserTag) {
|
||||
const matchedBadge = document.createElement('span');
|
||||
matchedBadge.className = 'download-user-badge';
|
||||
matchedBadge.textContent = download.matchedUserTag;
|
||||
header.appendChild(matchedBadge);
|
||||
}
|
||||
}
|
||||
|
||||
const details = document.createElement('div');
|
||||
|
||||
Reference in New Issue
Block a user