feat(web): use history routing and preserve scroll on filter changes

This commit is contained in:
kairee committed 2026-11-01 01:55:37 +08:00
1 parent 1b08854b25
commit 52a8d90c47
9 files changed
+113 -33

No files matched your search

+9
View File
@@ -84,6 +84,15 @@ def test_readonly_routes_and_static():
status, _, payload = running.request("/static/../config.json")
assert status == 404
# 伪静态前端路由:直接访问 /rank、/video/... 返回 index.html
for route_path in ("/rank", "/video/114775988111033", "/up/230020975", "/fans"):
status, route_headers, route_payload = running.request(route_path)
assert status == 200, route_path
assert "text/html" in route_headers["Content-Type"], route_path
assert b"<html" in route_payload.lower(), route_path
status, _, _ = running.request("/nope.js")
assert status == 404
status, _, payload = running.request("/api/videos")
assert status == 200
items = json.loads(payload)["data"]["items"]