Revert "Collapse watchlist alternative titles"

This reverts commit 0c1b46e395.
This commit is contained in:
Dymas
2026-05-23 19:14:34 +02:00
parent 5b0f4043ed
commit bead7da60a
7 changed files with 17 additions and 58 deletions
+8 -30
View File
@@ -413,23 +413,13 @@ WATCHLIST_HTML = r"""<!doctype html>
flex: 1;
min-width: 0;
}
.alt-toggle {
min-height: 30px;
padding: 0 10px;
border-radius: 999px;
font-size: 11px;
font-weight: 700;
}
.alt-titles {
.alt-title {
color: var(--muted);
font-size: 12px;
line-height: 1.35;
margin-top: 8px;
margin-top: 4px;
overflow-wrap: anywhere;
display: none;
}
.alt-titles.visible {
display: block;
min-height: 1.35em;
}
.card-title a {
color: inherit;
@@ -1011,8 +1001,7 @@ WATCHLIST_HTML = r"""<!doctype html>
<div class="title-row">
<div>
<div class="card-title"></div>
<button class="ghost alt-toggle" type="button" hidden>Alternative titles</button>
<div class="alt-titles" hidden></div>
<div class="alt-title"></div>
</div>
<span class="finish-check ${item.finished_badge || ""}" ${item.finished_badge ? "" : "hidden"}>${item.finished_badge ? "&check;" : ""}</span>
</div>
@@ -1041,21 +1030,10 @@ WATCHLIST_HTML = r"""<!doctype html>
titleLink.rel = "noopener noreferrer";
titleLink.textContent = item.title;
titleNode.replaceChildren(titleLink);
const altToggle = card.querySelector(".alt-toggle");
const altTitlesNode = card.querySelector(".alt-titles");
const altTitles = item.display_alt_titles || [];
if (altTitles.length) {
altToggle.hidden = false;
altTitlesNode.hidden = false;
altTitlesNode.textContent = altTitles.join(" · ");
altToggle.setAttribute("aria-expanded", "false");
altToggle.addEventListener("click", () => {
const visible = altTitlesNode.classList.toggle("visible");
altToggle.setAttribute("aria-expanded", visible ? "true" : "false");
altToggle.textContent = visible ? "Hide alternative titles" : "Alternative titles";
});
altToggle.textContent = "Alternative titles";
}
const altTitleNode = card.querySelector(".alt-title");
altTitleNode.textContent = (item.display_alt_titles || []).length
? `Alt: ${item.display_alt_titles.join(" · ")}`
: "";
const finishCheck = card.querySelector(".finish-check");
if (finishCheck && item.finished_badge) {
finishCheck.title = item.finished_badge === "downloaded"