Tidy watchlist action button layout

This commit is contained in:
Dymas
2026-05-25 23:34:52 +02:00
parent 5db94cffb1
commit 8fb32a59ba
6 changed files with 16 additions and 8 deletions
+4
View File
@@ -1,5 +1,9 @@
# Changelog # Changelog
## 0.45.5 - 2026-05-25
- Reworked the watchlist card action layout into two rows so `Refresh` and `Remove` sit on the first line, with `Download all` and `Auto-download` underneath for a less cluttered button group.
## 0.45.4 - 2026-05-25 ## 0.45.4 - 2026-05-25
- Fixed watchlist-triggered downloads to stop forcing `ani-cli` search result indexes from the web API result order; explicit search-page selections still keep their chosen result, but watchlist and auto-download jobs now avoid bad `-S` mismatches when `ani-cli` resolves the title differently. - Fixed watchlist-triggered downloads to stop forcing `ani-cli` search result indexes from the web API result order; explicit search-page selections still keep their chosen result, but watchlist and auto-download jobs now avoid bad `-S` mismatches when `ani-cli` resolves the title differently.
+2 -1
View File
@@ -2,7 +2,7 @@
Small local web UI for a system-wide `ani-cli` install. Small local web UI for a system-wide `ani-cli` install.
Current version: `0.45.4` Current version: `0.45.5`
## Project Layout ## Project Layout
@@ -256,6 +256,7 @@ Main behavior:
Auto-download layout note: `Name source` and `Name` share a wider half-and-half row inside the modal for easier editing. Auto-download layout note: `Name source` and `Name` share a wider half-and-half row inside the modal for easier editing.
11. Adding a show from Search reuses the current `Season` field as the initial auto-download series value for that new watchlist entry. 11. Adding a show from Search reuses the current `Season` field as the initial auto-download series value for that new watchlist entry.
12. Each watchlist entry can be tagged as `TV` or `Movie`, which changes where finished downloads are stored. 12. Each watchlist entry can be tagged as `TV` or `Movie`, which changes where finished downloads are stored.
13. Card actions are split into two rows so `Refresh` and `Remove` sit on the first line, with `Download all` and `Auto-download` on the second.
Episode offset: Episode offset:
+1 -1
View File
@@ -1 +1 @@
0.45.4 0.45.5
+1 -1
View File
@@ -20,7 +20,7 @@ from uuid import uuid4
PROJECT_ROOT = Path(__file__).resolve().parent PROJECT_ROOT = Path(__file__).resolve().parent
ANI_CLI = os.environ.get("ANI_CLI_BIN") or shutil.which("ani-cli") or "ani-cli" ANI_CLI = os.environ.get("ANI_CLI_BIN") or shutil.which("ani-cli") or "ani-cli"
APP_NAME = "ani-cli-web" APP_NAME = "ani-cli-web"
VERSION = "0.45.4" VERSION = "0.45.5"
ALLANIME_BASE = "allanime.day" ALLANIME_BASE = "allanime.day"
ALLANIME_API = f"https://api.{ALLANIME_BASE}" ALLANIME_API = f"https://api.{ALLANIME_BASE}"
ALLANIME_REFERER = "https://allmanga.to" ALLANIME_REFERER = "https://allmanga.to"
+3
View File
@@ -2594,6 +2594,9 @@ class TemplateHelperTests(unittest.TestCase):
self.assertIn('downloadPicker.classList.toggle("visible")', APP.WATCHLIST_HTML) self.assertIn('downloadPicker.classList.toggle("visible")', APP.WATCHLIST_HTML)
self.assertIn('downloadWatchlistItem(item, "sub"', APP.WATCHLIST_HTML) self.assertIn('downloadWatchlistItem(item, "sub"', APP.WATCHLIST_HTML)
self.assertIn('downloadWatchlistItem(item, "dub"', APP.WATCHLIST_HTML) self.assertIn('downloadWatchlistItem(item, "dub"', APP.WATCHLIST_HTML)
self.assertIn("grid-template-columns: repeat(2, minmax(0, 1fr));", APP.WATCHLIST_HTML)
self.assertLess(APP.WATCHLIST_HTML.index('<button class="primary" type="button">Refresh</button>'), APP.WATCHLIST_HTML.index('<button class="danger" type="button">Remove</button>'))
self.assertLess(APP.WATCHLIST_HTML.index('<button class="danger" type="button">Remove</button>'), APP.WATCHLIST_HTML.index('<button class="ghost" type="button">Download all</button>'))
def test_watchlist_page_renders_alternative_titles_toggle(self): def test_watchlist_page_renders_alternative_titles_toggle(self):
self.assertIn("Alternative titles", APP.WATCHLIST_HTML) self.assertIn("Alternative titles", APP.WATCHLIST_HTML)
+5 -5
View File
@@ -639,7 +639,7 @@ WATCHLIST_HTML = r"""<!doctype html>
} }
.card-actions { .card-actions {
display: grid; display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 8px; gap: 8px;
} }
.card-actions button { .card-actions button {
@@ -1374,9 +1374,9 @@ WATCHLIST_HTML = r"""<!doctype html>
<div class="muted card-date"></div> <div class="muted card-date"></div>
<div class="card-actions"> <div class="card-actions">
<button class="primary" type="button">Refresh</button> <button class="primary" type="button">Refresh</button>
<button class="danger" type="button">Remove</button>
<button class="ghost" type="button">Download all</button> <button class="ghost" type="button">Download all</button>
<button class="ghost" type="button">Auto-download</button> <button class="ghost" type="button">Auto-download</button>
<button class="danger" type="button">Remove</button>
<div class="download-picker"> <div class="download-picker">
<button class="ghost" type="button">Sub</button> <button class="ghost" type="button">Sub</button>
<button class="ghost" type="button">Dub</button> <button class="ghost" type="button">Dub</button>
@@ -1426,9 +1426,9 @@ WATCHLIST_HTML = r"""<!doctype html>
}); });
const actionButtons = card.querySelector(".card-actions").querySelectorAll("button"); const actionButtons = card.querySelector(".card-actions").querySelectorAll("button");
const refreshBtn = actionButtons[0]; const refreshBtn = actionButtons[0];
const downloadBtn = actionButtons[1]; const removeBtn = actionButtons[1];
const autoDownloadBtn = actionButtons[2]; const downloadBtn = actionButtons[2];
const removeBtn = actionButtons[3]; const autoDownloadBtn = actionButtons[3];
const subBtn = actionButtons[4]; const subBtn = actionButtons[4];
const dubBtn = actionButtons[5]; const dubBtn = actionButtons[5];
const downloadPicker = card.querySelector(".download-picker"); const downloadPicker = card.querySelector(".download-picker");