feat: render availableForUpgrade badge on failed history items where episode/movie is already on disk
This commit is contained in:
@@ -973,6 +973,14 @@ function createHistoryCard(item) {
|
||||
outcomeBadge.textContent = item.outcome === 'imported' ? '✓ Imported' : '✗ Failed';
|
||||
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) {
|
||||
const instBadge = document.createElement('span');
|
||||
instBadge.className = 'history-instance-badge';
|
||||
|
||||
@@ -779,7 +779,8 @@ body {
|
||||
|
||||
.history-type-badge,
|
||||
.history-outcome-badge,
|
||||
.history-instance-badge {
|
||||
.history-instance-badge,
|
||||
.history-upgrade-badge {
|
||||
font-size: 0.72rem;
|
||||
font-weight: 600;
|
||||
padding: 2px 7px;
|
||||
@@ -787,6 +788,12 @@ body {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.history-upgrade-badge {
|
||||
background: #e67e22;
|
||||
color: #fff;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.history-type-badge.series {
|
||||
background: var(--badge-series-bg, #2980b9);
|
||||
color: #fff;
|
||||
|
||||
Reference in New Issue
Block a user