feat: render availableForUpgrade badge on failed history items where episode/movie is already on disk
All checks were successful
Build and Push Docker Image / build (push) Successful in 38s
CI / Security audit (push) Successful in 1m41s
CI / Tests & coverage (push) Successful in 1m49s

This commit is contained in:
2026-05-17 21:53:58 +01:00
parent 6139095444
commit 55a5577f2a
2 changed files with 16 additions and 1 deletions

View File

@@ -973,6 +973,14 @@ function createHistoryCard(item) {
outcomeBadge.textContent = item.outcome === 'imported' ? '✓ Imported' : '✗ Failed'; outcomeBadge.textContent = item.outcome === 'imported' ? '✓ Imported' : '✗ Failed';
header.appendChild(outcomeBadge); header.appendChild(outcomeBadge);
if (item.availableForUpgrade) {
const upgradeBadge = document.createElement('span');
upgradeBadge.className = 'history-upgrade-badge';
upgradeBadge.title = 'A previous version of this item is available. An upgrade download has failed.';
upgradeBadge.textContent = '⬆ Available';
header.appendChild(upgradeBadge);
}
if (item.instanceName) { if (item.instanceName) {
const instBadge = document.createElement('span'); const instBadge = document.createElement('span');
instBadge.className = 'history-instance-badge'; instBadge.className = 'history-instance-badge';

View File

@@ -779,7 +779,8 @@ body {
.history-type-badge, .history-type-badge,
.history-outcome-badge, .history-outcome-badge,
.history-instance-badge { .history-instance-badge,
.history-upgrade-badge {
font-size: 0.72rem; font-size: 0.72rem;
font-weight: 600; font-weight: 600;
padding: 2px 7px; padding: 2px 7px;
@@ -787,6 +788,12 @@ body {
white-space: nowrap; white-space: nowrap;
} }
.history-upgrade-badge {
background: #e67e22;
color: #fff;
cursor: default;
}
.history-type-badge.series { .history-type-badge.series {
background: var(--badge-series-bg, #2980b9); background: var(--badge-series-bg, #2980b9);
color: #fff; color: #fff;