feat: show import-pending red lozenge when Sonarr/Radarr has issues
- Detect trackedDownloadState=importPending or status=warning/error - Extract statusMessages and errorMessage from queue records - Display red 'Import Pending' badge on download card header - Hover reveals tooltip with the specific issue messages - Visible to all users (not admin-only)
This commit is contained in:
@@ -384,6 +384,14 @@ function createDownloadCard(download) {
|
||||
|
||||
header.appendChild(type);
|
||||
header.appendChild(status);
|
||||
|
||||
if (download.importIssues && download.importIssues.length > 0) {
|
||||
const issueBadge = document.createElement('span');
|
||||
issueBadge.className = 'import-issue-badge';
|
||||
issueBadge.textContent = 'Import Pending';
|
||||
issueBadge.setAttribute('data-tooltip', download.importIssues.join('\n'));
|
||||
header.appendChild(issueBadge);
|
||||
}
|
||||
|
||||
const title = document.createElement('h3');
|
||||
title.className = 'download-title';
|
||||
|
||||
@@ -688,6 +688,38 @@ body {
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
/* ===== Import Issue Badge ===== */
|
||||
.import-issue-badge {
|
||||
padding: 2px 8px;
|
||||
border-radius: 10px;
|
||||
font-size: 0.65rem;
|
||||
font-weight: 600;
|
||||
background: #ffebee;
|
||||
color: #c62828;
|
||||
cursor: help;
|
||||
position: relative;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.import-issue-badge:hover::after {
|
||||
content: attr(data-tooltip);
|
||||
position: absolute;
|
||||
top: calc(100% + 6px);
|
||||
left: 0;
|
||||
background: #424242;
|
||||
color: #fff;
|
||||
padding: 8px 12px;
|
||||
border-radius: 6px;
|
||||
font-size: 0.7rem;
|
||||
font-weight: 400;
|
||||
white-space: pre-line;
|
||||
max-width: 320px;
|
||||
z-index: 100;
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.25);
|
||||
line-height: 1.4;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.download-user-badge {
|
||||
padding: 2px 8px;
|
||||
border-radius: 10px;
|
||||
|
||||
Reference in New Issue
Block a user