feat(web): include removed in visible stats; cover bang badge

站内展示/统计统一 VISIBLE(含 removed):热度、UP 列表、总览
active_ups/初导入计数、说明页粉丝覆盖、黑名单视频数。采集队列仍
只 active/unfaved。失效片封面右上角感叹号徽标,点击/tap 提示
「该视频已失效」;手动/候选入库仍可复活 removed→active。
This commit is contained in:
bot-ci committed 2026-11-03 23:45:44 +08:00
1 parent 6c73904b25
commit 0c660c6474
7 files changed
+122 -17

No files matched your search

+34
View File
@@ -0,0 +1,34 @@
# -*- coding: utf-8 -*-
"""失效封面徽标静态落地检查: uv run python tests/test_removed_cover_mark.py"""
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
STATIC = ROOT / "reaction_board" / "web" / "static"
def test_removed_cover_mark_markup():
components = (STATIC / "components.js").read_text(encoding="utf-8")
assert "export function removedCoverMark" in components
assert 'data-removed-tip' in components
assert "该视频已失效" in components
assert "${removedCoverMark(item)}" in components
app = (STATIC / "app.js").read_text(encoding="utf-8")
assert 'closest("[data-removed-tip]")' in app
assert 'toast("该视频已失效")' in app
css = (STATIC / "style.css").read_text(encoding="utf-8")
assert ".cover-removed-mark" in css
video = (STATIC / "views" / "video.js").read_text(encoding="utf-8")
assert "removedCoverMark(detail)" in video
def main():
test_removed_cover_mark_markup()
print("OK: 失效封面徽标静态落地检查通过")
if __name__ == "__main__":
main()