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';
|
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';
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user