From df4eb39ddf2e484c9bd4975030e4301bd0214abd Mon Sep 17 00:00:00 2001 From: Dymas Date: Mon, 25 May 2026 10:19:50 +0200 Subject: [PATCH] Open auto-download settings in modal overlay --- CHANGELOG.md | 4 + README.md | 2 +- VERSION | 2 +- app_support.py | 2 +- test_app.py | 3 + watchlist_page.py | 284 ++++++++++++++++++++++++++++++---------------- 6 files changed, 194 insertions(+), 103 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1914d36..57b4fd4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 0.40.1 - 2026-05-25 + +- Replaced the per-card auto-download expansion with a centered overlay dialog so opening settings no longer shifts the watchlist grid layout. + ## 0.40.0 - 2026-05-25 - Added per-watchlist storage for downloaded sub and dub episode lists so auto-download can compare actual downloaded history instead of only refresh count deltas. diff --git a/README.md b/README.md index d54517e..ca2e299 100644 --- a/README.md +++ b/README.md @@ -224,7 +224,7 @@ Main behavior: 7. Summary cards show total tracked shows plus `sub` and `dub` counts. 8. Pagination shows 30 cards per page. 9. `Alternative titles` expands English alternate titles from AniDB when the watchlist refresh can match the show to an AniDB entry. -10. `Auto-download` opens per-series settings for language, quality, series number, and the sanitized library name used for automatically queued episodes. +10. `Auto-download` opens a centered overlay with per-series settings for language, quality, series number, and the sanitized library name used for automatically queued episodes. Status behavior: diff --git a/VERSION b/VERSION index 9b0025a..d0a1915 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.40.0 +0.40.1 diff --git a/app_support.py b/app_support.py index a70bc80..2ccfc52 100644 --- a/app_support.py +++ b/app_support.py @@ -19,7 +19,7 @@ from uuid import uuid4 PROJECT_ROOT = Path(__file__).resolve().parent ANI_CLI = os.environ.get("ANI_CLI_BIN") or shutil.which("ani-cli") or "ani-cli" APP_NAME = "ani-cli-web" -VERSION = "0.40.0" +VERSION = "0.40.1" ALLANIME_BASE = "allanime.day" ALLANIME_API = f"https://api.{ALLANIME_BASE}" ALLANIME_REFERER = "https://allmanga.to" diff --git a/test_app.py b/test_app.py index 8bd95d4..79cb70c 100644 --- a/test_app.py +++ b/test_app.py @@ -1986,7 +1986,10 @@ class TemplateHelperTests(unittest.TestCase): def test_watchlist_page_renders_auto_download_editor(self): self.assertIn("Auto-download", APP.WATCHLIST_HTML) + self.assertIn('id="autoDownloadOverlay"', APP.WATCHLIST_HTML) self.assertIn('api("/api/watchlist/update-auto-download"', APP.WATCHLIST_HTML) + self.assertIn("openAutoDownloadOverlay(item)", APP.WATCHLIST_HTML) + self.assertIn("closeAutoDownloadOverlay()", APP.WATCHLIST_HTML) self.assertIn("Save auto-download", APP.WATCHLIST_HTML) self.assertIn("Manual add does not trigger it", APP.WATCHLIST_HTML) self.assertIn("Name source", APP.WATCHLIST_HTML) diff --git a/watchlist_page.py b/watchlist_page.py index ac86055..537a634 100644 --- a/watchlist_page.py +++ b/watchlist_page.py @@ -551,35 +551,63 @@ WATCHLIST_HTML = r""" display: grid; gap: 6px; } - .auto-download-panel { + .overlay[hidden] { display: none; - grid-column: 1 / -1; - gap: 10px; - border: 1px solid var(--line); - border-radius: 16px; - background: rgba(255, 255, 255, 0.04); - padding: 12px; } - .auto-download-panel.visible { + .overlay { + position: fixed; + inset: 0; display: grid; + place-items: center; + padding: 24px; + background: rgba(7, 10, 16, 0.74); + backdrop-filter: blur(10px); + z-index: 1200; + } + .auto-download-modal { + width: min(640px, 100%); + display: grid; + gap: 14px; + border: 1px solid var(--line); + border-radius: 22px; + background: linear-gradient(180deg, rgba(20, 27, 40, 0.98), rgba(12, 17, 28, 0.98)); + box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45); + padding: 18px; + } + .auto-download-modal-header { + display: flex; + justify-content: space-between; + align-items: flex-start; + gap: 12px; + } + .auto-download-modal-header p { + margin: 4px 0 0; + } + .auto-download-modal-close { + min-width: 36px; + min-height: 36px; + border-radius: 999px; + font-size: 18px; + line-height: 1; } .auto-download-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } - .auto-download-panel label { + .auto-download-modal label { font-size: 10px; } - .auto-download-panel input, - .auto-download-panel select { + .auto-download-modal input, + .auto-download-modal select { min-height: 36px; padding: 0 10px; font-size: 13px; } .auto-download-actions { display: flex; - justify-content: flex-end; + justify-content: space-between; + align-items: center; gap: 8px; flex-wrap: wrap; } @@ -736,6 +764,47 @@ WATCHLIST_HTML = r""" + +