Highlight fully ready finished watchlist cards

This commit is contained in:
Dymas
2026-05-17 21:43:11 +02:00
parent 2a0da335b2
commit 91b1e36a94
6 changed files with 27 additions and 3 deletions
+15 -1
View File
@@ -303,10 +303,19 @@ WATCHLIST_HTML = r"""<!doctype html>
box-shadow: 0 18px 38px rgba(5, 2, 15, 0.32);
transition: transform 0.18s ease, border-color 0.18s ease;
}
.anime-card.fully-ready {
border-color: rgba(149, 228, 186, 0.72);
box-shadow:
inset 0 0 0 1px rgba(149, 228, 186, 0.18),
0 18px 38px rgba(5, 2, 15, 0.32);
}
.anime-card:hover {
border-color: var(--line-strong);
transform: translateY(-2px);
}
.anime-card.fully-ready:hover {
border-color: rgba(149, 228, 186, 0.88);
}
.anime-card.error {
border-color: rgba(255, 144, 164, 0.3);
}
@@ -699,6 +708,11 @@ WATCHLIST_HTML = r"""<!doctype html>
return parts.map((part) => part[0]).join("").slice(0, 2);
}
function watchlistCardClassName(item) {
const isFullyReady = item.category === "finished" && item.sub_complete && item.dub_complete;
return `anime-card${item.status === "error" ? " error" : ""}${isFullyReady ? " fully-ready" : ""}`;
}
function formatModeProgress(currentCount, expectedCount) {
const current = Number(currentCount || 0);
const expected = Number(expectedCount || 0);
@@ -965,7 +979,7 @@ WATCHLIST_HTML = r"""<!doctype html>
for (const item of items) {
const card = document.createElement("article");
const checked = item.last_checked ? new Date(item.last_checked).toLocaleString() : "Never";
card.className = `anime-card${item.status === "error" ? " error" : ""}`;
card.className = watchlistCardClassName(item);
card.dataset.showId = item.show_id;
card.title = item.thumbnail_debug || "Thumbnail source: unresolved";
card.innerHTML = `