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

- 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:
2026-05-16 15:14:33 +01:00
parent de8563704a
commit 24b7797b60
3 changed files with 83 additions and 29 deletions

View File

@@ -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');