Peach: Local-first video metadata scraper and media manager.
fix: 检查播放编码、补全采集来源并恢复控件灰阶
Codexdd274a86ffb7
diff --git a/docs/HANDOFF.md b/docs/HANDOFF.mdindex 908b54c8d..537e7d329 100644--- a/docs/HANDOFF.md+++ b/docs/HANDOFF.md@@ -72,6 +72,8 @@## 参考产品证据登记+- 图 3、JavDB:`docs/REUSE.md`。+快照、URL、版本、SHA、未取得面与 Peach 的有意差异统一登记在 `docs/reference-sources.json` 和`docs/reference-snapshots/`,每份快照自带「Peach 采用与差异」一节;获取、失效复核与接受更新的流程见`.claude/skills/peach-reference-evidence/SKILL.md`。本文件不复制会随上游变化的测量值,只登记哪件事看哪份快照。diff --git a/docs/REUSE.md b/docs/REUSE.mdindex 05d60e24d..a4f3bd146 100644--- a/docs/REUSE.md+++ b/docs/REUSE.md@@ -8,6 +8,11 @@测试与集成复用 `test_runner.py`、`agent_worktree.py`;进程互斥采用开发依赖`filelock==3.32.4` 的 `FileLock`([官方用法](https://py-filelock.readthedocs.io/en/stable/tutorials.html))。跨进程占锁与释放由临时 Git 仓库回归验证;代码、环境和范围记录属于 Peach 的集成约束。+### 播放、身份与控件实证++- 2026-09-05,用户图 3 的 PNG 像素统计:页面 `#04060A`、框体 `#080A0D`、操作条 `#141619`、选中项 `#191B1E`。操作条复用 `--overlay-5`,骨架与最终控件共用灰阶。截图为用户提供的静态证据,不登记为可重抓上游资源。+- [JavDB JBS-023](https://javdb.com/v/6gzM):项目取页器与 Javinizer-Go v1.5.1 均取得 `風見あゆむ`。本机 provider 配置的 `scrapers.javdb.enabled` 必须开启;源码有码补抓列表包含 JavDB。候选保留 community 来源性质,不自动写真相字段。+- 编码边界依据 [MDN 视频编码说明](https://developer.mozilla.org/en-US/docs/Web/Media/Guides/Formats/Video_codecs) 与 [ffprobe 流探测文档](https://ffmpeg.org/ffprobe.html)。复用当前 FFmpeg,无新增依赖;Peach 仅持有兼容格式判定与缓存策略。CloudDrive 引导复用现有 `settings_file`、`platform.root_online`、`scan_location` 和 Preact配置 island;来源仍为 `local`、`115`、`pikpak`。外部挂载由已安装的 CloudDrive 负责,@@ -96,7 +101,7 @@ CloudDrive 为外部应用,本项目不捆绑其二进制或依赖其管理 AP| JAV 元数据查询 | Javinizer-Go v1.5.1 单来源 JSON CLI(MIT);MetaTube SDK `6a5e6128c725187aeaf921d48ed7d9cd9f30671b`(Apache-2.0)只作来源身份与丰富字段模型参考 | 只发送规范番号;Peach 管 source profile、`provider_id`/`content_id`、逐字段优先级、原始证据、丰富目录证据、健康统计、候选复核与批准后的 ledger 投影 || 已确认厂牌的目录归位 | Javinizer-Go v1.5.1 organizer 只作冲突预检、模板化目录和回滚边界参考,不让它持有 Peach ledger | `rehome_unknown_jav.py` 只消费人工确认映射;先出逐文件 CSV,拒绝扁平化重名与厂牌冲突,SQLite 备份后移动文件并同步 Peach 路径/实体 provenance || FC2 目录元数据与跨号证据 | 已缓存的 fc2cmadb Inertia `article`/评论收获;Javinizer-Go v1.5.1 的 FC2 解析器只作官方商品页字段边界参考 | 2026-08-31 登录态实测旧文章仍提供标题、原始标签、日期、时长、卖家、FC2 CDN 封面与 `comments`;Peach 只把无歧义标签翻译成现有词表,标题/标签进入 `/review`,实测 `w1200` 封面经尺寸与解码门槛落生成产物;稳定 pair、合集/分片保护、hash/时长/尺寸佐证、库外 evidence、健康统计和人工复核仍由 Peach 管,不依赖 FC2-Leak-Detector/JavSP,也不把镜像候选直写 ledger |-| 媒体探测/转码 | Peach 管理的 FFmpeg/ffprobe;Windows 已实测 FFmpeg 9.0.1 full build 的 CUDA/NVDEC、`scale_cuda` 与 NVENC,现有二进制启用 GPL/version3 | 任务策略和 Media Engine 编排:非原生容器先探测,H.264 8-bit 优先只换 MP4 封装;其余 Windows 输入依次尝试 CUDA→H.264 NVENC、软件解码→NVENC、原 `libx264` 回退,macOS 保持封装复制或软件转码。真实 CloudDrive POC 中,H.264/AAC 的 30 秒片段封装耗时 0.64 秒,1080p HEVC 的 30 秒 CUDA/NVENC 转码耗时 1.60 秒;不新增依赖,不改原媒体或 ledger。 |+| 媒体探测/转码 | Peach 管理的 FFmpeg/ffprobe;Windows 已实测 FFmpeg 9.0.1 full build 的 CUDA/NVDEC、`scale_cuda` 与 NVENC,现有二进制启用 GPL/version3 | 任务策略和 Media Engine 编排:容器与内部编码分别检查,MP4/M4V 的 H.264 8-bit 与兼容音轨可直出;其余容器中的 H.264 8-bit 优先只换 MP4 封装;其余 Windows 输入依次尝试 CUDA→H.264 NVENC、软件解码→NVENC、原 `libx264` 回退,macOS 保持封装复制或软件转码。2026-09-05 的 JBS-023 原片为 MPEG-4 Part 2/AAC,12 秒样本经既有 FFmpeg 链路在 2.42 秒输出 H.264/AAC 并通过画面解码;兼容性依据为 MDN Web video codec guide 与 ffprobe 官方 stream 文档。真实 CloudDrive POC 中,H.264/AAC 的 30 秒片段封装耗时 0.64 秒,1080p HEVC 的 30 秒 CUDA/NVENC 转码耗时 1.60 秒;不新增依赖,不改原媒体或 ledger。 || HTML5/HLS/DASH 播放 | Video.js 8.24.0 + 内置 VHS(Apache-2.0,本地固定版本) | 流方案、授权、稳定时长、回退顺序和统计面板 || 播放器设置与影院布局 | Video.js 8.24.0 的 `playbackRate`、既有 QualityLevel、原生 tooltip 与控制栏插槽;YouTube `e937390a` 实际 DOM/CSS/JS 提供可复现的几何、状态、动画和图形证据 | Peach 在现有 DOM 上组合氛围模式、播放速度、真实清晰度和影院模式,并复用 59 px 两排控制栏、40→111 px 横向音量、4→6 px 进度动画、右侧共享胶囊、整行悬停的 274 px 设置菜单和视口级全屏;普通视图 `contain` 保全片源,全屏按用户明确要求改用 `cover` 铺满视口,接受非等比例片源的边缘裁切。全屏命中同时使用 Video.js/原生类和 `isFullscreen()` 同步的 `data-peach-fullscreen`,并覆盖 `body.vjs-full-window` 回退,不能再靠单个 CSS 类推断运行态;标准、WebKit、Gecko 等浏览器专用伪类必须放进 forgiving `:is(...)` 或拆成独立规则,不能在普通 selector list 混写后让某浏览器因未知伪类废掉整组声明。用户要求精准图形的设置项、radio 选中勾、菜单箭头、中央 bezel 与 loading 只 vendoring 当前锁定版本的 SVG path/spinner 结构,音量 hover 与滑轨中心沿用上游外层伪元素和 50% 几何,tooltip 仅补 Peach 两排控制栏需要的显式层级与越界可见;不复制播放器控制逻辑、不迁移到 Video.js 10 Menu,也不引入重复现有质量选择的插件 || 播放器时刻预览 | Video.js 原生进度控件 + Peach 既有 `/poster?id=&c=0…8` 九宫格切片 | 本地媒体用已有接触表提供近似时刻缩略图;在线视频只显示时刻。`videojs-vtt-thumbnails` 与 `videojs-sprite-thumbnails` 都要求另建 sprite/VTT 契约,本项目不为已有能力新增依赖或重复抽帧 |diff --git a/docs/STATUS.md b/docs/STATUS.mdindex 4ff924abe..bc709cf20 100644--- a/docs/STATUS.md+++ b/docs/STATUS.md@@ -26,7 +26,8 @@一条一句,不带日期,只写别处没有的判据:README、`docs/HANDOFF.md`、`docs/REUSE.md`、`docs/OPERATIONS.md` 和 ADR 已经写下的不在这里重复,出处用 `git log -S` 查。-- 本地浏览器支持 MP4/WebM/Ogg,AVI 等由 `TranscodeService` 缓存成 H.264/AAC MP4,永不改写原媒体;ffprobe 探测后可直接复制的流不重编码,其余在 Windows 走 CUDA/NVDEC。+- ffprobe 核对内部编码;`mpeg4/AAC` 实片转 H.264/AAC 后画面解码通过,原媒体不改。+- 控件按图 3 恢复灰阶;29999 关联風見あゆむ,账本完整性通过。实屏未验。- 远端 MP4 默认走标准 Range,显式开启的 HLS 使用关键帧对齐片段并在失败时回退 Range。- 页面共用 SPA、JSON 与 gzip/ETag;侧栏随当前视频集合,已保存在线作品复用关注详情。- Logo、侧栏「首页」和沉浸模式关闭统一清除分类、搜索与 JAV 筛选,首页默认稳定随机、换批才换种子,再点当前排序回到随机。diff --git a/src/peach/metadata_policy.py b/src/peach/metadata_policy.pyindex c05d9b5d0..05017dd73 100644--- a/src/peach/metadata_policy.py+++ b/src/peach/metadata_policy.py@@ -78,7 +78,7 @@ ROUTED_PROFILE_SOURCES = {# Cloudflare 与 403 挡住(不绕机器人检测),javbus 是唯一问得到的一家;# 它是 community,取值只能进人工复核,不进免复核写入。"uncensored": ("caribbeancom", "tokyohot", "javbus"),- "censored": ("mgstage", "dmm", "libredmm", "aventertainment"),+ "censored": ("mgstage", "dmm", "libredmm", "aventertainment", "javdb"),},}for _name, _routes in ROUTED_PROFILE_SOURCES.items():diff --git a/src/peach/transcodes.py b/src/peach/transcodes.pyindex d2333ac66..aae65f2ca 100644--- a/src/peach/transcodes.py+++ b/src/peach/transcodes.py@@ -59,6 +59,7 @@ class TranscodeService:self._locks: dict[int, list] = {}self._locks_guard = threading.Lock()self._slots = threading.Semaphore(max(1, max_concurrent))+ self._native_profiles: dict[tuple[str, int, int], _MediaProfile] = {}@staticmethoddef needs_transcode(source: Path) -> bool:@@ -67,8 +68,27 @@ class TranscodeService:def browser_path(self, asset_id: int, source: Path, *, session: str = "", registry=None,) -> tuple[Path, bool]:+ profile = Noneif not self.needs_transcode(source):- return source, False+ if self.resolver.ffprobe() is None:+ return source, False+ try:+ stat = source.stat()+ except OSError as exc:+ raise TranscodeUnavailable("source unavailable") from exc+ key = (str(source), stat.st_size, stat.st_mtime_ns)+ with self._locks_guard:+ profile = self._native_profiles.get(key)+ if profile is None:+ profile = self._probe(source, session, registry,+ time.monotonic() + PROBE_TIMEOUT_SECONDS)+ if profile is not None:+ with self._locks_guard:+ if len(self._native_profiles) >= 512:+ self._native_profiles.pop(next(iter(self._native_profiles)))+ self._native_profiles[key] = profile+ if profile is not None and self._browser_compatible(source, profile):+ return source, Falsechoice = self.resolver.ffmpeg()if choice is None:@@ -94,7 +114,8 @@ class TranscodeService:try:with self._slots:self._raise_if_cancelled(session, registry)- profile = self._probe(source, session, registry, deadline)+ if profile is None:+ profile = self._probe(source, session, registry, deadline)for attempt in self._attempts(choice.path, source, temporary, profile,):@@ -131,6 +152,18 @@ class TranscodeService:stale.unlink(missing_ok=True)return target, True+ @staticmethod+ def _browser_compatible(source: Path, profile: _MediaProfile) -> bool:+ if source.suffix.lower() in {".mp4", ".m4v"}:+ return (profile.video_codec == "h264"+ and profile.pixel_format in DIRECT_MP4_PIXEL_FORMATS+ and profile.audio_codec in {"", "aac", "mp3"})+ if source.suffix.lower() == ".webm":+ return (profile.video_codec in {"vp8", "vp9", "av1"}+ and profile.audio_codec in {"", "opus", "vorbis"})+ return (profile.video_codec == "theora"+ and profile.audio_codec in {"", "vorbis", "opus"})+def _probe(self, source: Path, session: str, registry, deadline: float,) -> _MediaProfile | None:diff --git a/tests/test_fastapi_api.py b/tests/test_fastapi_api.pyindex 38174afcd..254675c13 100644--- a/tests/test_fastapi_api.py+++ b/tests/test_fastapi_api.py@@ -230,6 +230,14 @@ class FastApiContractTests(unittest.IsolatedAsyncioTestCase):taste_history_manifest=self.taste_manifest,)self.app = create_app(self.settings)+ # 字节与时间表夹具不含可解码画面;编码判定由媒体域的真实样本覆盖。+ from peach.transcodes import _MediaProfile+ self.profile_patch = patch.object(+ self.app.state.transcode_service, "_probe",+ return_value=_MediaProfile("h264", "yuv420p", "aac"),+ )+ self.profile_patch.start()+ self.addCleanup(self.profile_patch.stop)self.assertIs(self.app.state.web_contract.database,self.app.state.repository.database,@@ -645,6 +653,22 @@ class FastApiContractTests(unittest.IsolatedAsyncioTestCase):])connection.close()+ async def test_catalog_keeps_missing_performers_separate_from_release_code(self):+ with closing(sqlite3.connect(self.db)) as con:+ con.execute(+ "INSERT INTO asset(id,location,path,name,medium,size,code,studio,first_seen) "+ "VALUES(29999,'local',?,'JBS-023.mp4','video',10,'JBS-023','Prestige','2026-09-05')",+ (str((self.media_root / 'JBS-023.mp4').resolve()),),+ )+ con.commit()+ response = await self.client.get('/api/items?t=secret&loc=local')+ self.assertEqual(response.status_code, 200)+ item = next(row for row in response.json()['items'] if row['id'] == 29999)+ self.assertEqual(item['code'], 'JBS-023')+ self.assertFalse(item.get('creator'))+ self.assertEqual(item['performers'], [])+ self.assertEqual(item['performer_entities'], [])+async def test_auth_and_items_contract(self):denied = await self.client.get("/api/items")self.assertEqual(denied.status_code, 401)diff --git a/tests/test_metadata_policy.py b/tests/test_metadata_policy.pyindex 2ec476543..2302a39b1 100644--- a/tests/test_metadata_policy.py+++ b/tests/test_metadata_policy.py@@ -123,11 +123,11 @@ class MetadataPolicyTests(unittest.TestCase):self.assertEqual(policy.sources_for_code("HEYZO-1380"),("caribbeancom", "tokyohot", "javbus"))self.assertEqual(policy.sources_for_code("ABW-220"),- ("mgstage", "dmm", "libredmm", "aventertainment"))+ ("mgstage", "dmm", "libredmm", "aventertainment", "javdb"))# 来源健康表要覆盖两边,所以 sources 是并集。self.assertEqual(set(policy.sources), {"caribbeancom", "tokyohot", "javbus",- "mgstage", "dmm", "libredmm", "aventertainment"})+ "mgstage", "dmm", "libredmm", "aventertainment", "javdb"})def test_unrouted_profiles_keep_asking_every_source(self):for profile in ("baseline", "censored", "uncensored", "fc2", "official-backfill"):diff --git a/tests/test_transcodes.py b/tests/test_transcodes.pyindex bcb22f5d3..65592714b 100644--- a/tests/test_transcodes.py+++ b/tests/test_transcodes.py@@ -55,6 +55,40 @@ def _media_process(commands, profile, fail=None):class TranscodeServiceTests(unittest.TestCase):+ def test_native_containers_are_checked_against_their_streams(self):+ cases = (+ (".mp4", "mpeg4", "yuv420p", "aac", True),+ (".mp4", "hevc", "yuv420p10le", "aac", True),+ (".mp4", "h264", "yuv420p10le", "aac", True),+ (".mp4", "h264", "yuv420p", "ac3", True),+ (".mp4", "h264", "yuv420p", "aac", False),+ (".webm", "vp9", "yuv420p", "opus", False),+ )+ for suffix, codec, pixel_format, audio, expected in cases:+ with self.subTest(codec=codec, pixel_format=pixel_format, audio=audio):+ with tempfile.TemporaryDirectory() as tmp:+ root = Path(tmp).resolve()+ source = root / ("movie" + suffix)+ source.write_bytes(b"source")+ service = TranscodeService(+ _Resolver(root / "ffmpeg.exe", root / "ffprobe.exe"),+ root / "cache", prefer_hardware=False,+ )+ commands = []+ streams = [+ {"codec_type": "video", "codec_name": codec, "pix_fmt": pixel_format},+ {"codec_type": "audio", "codec_name": audio},+ ]+ with patch("peach.transcodes.subprocess.Popen",+ side_effect=_media_process(commands, streams)):+ result = service.browser_path(29999, source)+ self.assertEqual(service.browser_path(29999, source), result)+ self.assertEqual(result[1], expected)+ self.assertEqual(source.read_bytes(), b"source")+ self.assertEqual(sum("ffprobe" in c[0] for c in commands), 1)+ if expected:+ self.assertEqual(result[0].read_bytes(), b"mp4")+def test_native_mp4_is_returned_without_ffmpeg(self):source = Path("movie.mp4")service = TranscodeService(_Resolver(None), Path("cache"))diff --git a/tests/test_web_ui.py b/tests/test_web_ui.pyindex 0ca661c32..229cd34e7 100644--- a/tests/test_web_ui.py+++ b/tests/test_web_ui.py@@ -401,13 +401,7 @@ class WebUiSourceTests(unittest.TestCase):"输入框的聚焦环不用蓝,走 --field-ring-focus")def test_fieldsets_put_the_bright_face_on_the_content_and_the_bar_below_it(self):- """框体正文是全站最亮的面,操作条落回页面底那一档,两档都跟着主题走。-- 2026-09-05 实测 vercel.com 的团队设置 fieldset:正文 `#FFFFFF`、操作条 `#FAFAFA`- 加一条 1px `#EBEBEB` 的上边线,外圈是 1px 的 8% 黑;暗色一档是 `#0A0A0A` 正文配- 纯黑操作条——方向相同,操作条永远更深。操作条与页面底共用 `--page` 是照着 Vercel- 写的,那边也是同一个 `--ds-background-200`:条子退到后面那张面上,正文浮在它之上。- """+ """操作条以中性透明灰叠在框体上,与骨架使用同一灰阶。"""self.assertPageContains("--page:#FAFAFA;")self.assertPageContains("--page:#04060A;")for selector in (".cleanupfieldset", ".reviewitem", ".fsec",@@ -418,7 +412,7 @@ class WebUiSourceTests(unittest.TestCase):".fsechead", ".fsecfoot", ".resourcesyncfooter,.resourceapplyrow"):start = css.index(name + "{")rule = css[start:css.index("}", start)]- self.assertIn("background:var(--page)", rule, f"{name} 是操作条")+ self.assertIn("background:var(--overlay-5)", rule, f"{name} 是操作条")self.assertIn("var(--line-soft)", rule, f"{name} 与正文之间是一条发丝线")def test_buttons_keep_two_tiers_a_solid_primary_and_a_bright_secondary(self):@@ -1750,12 +1744,15 @@ class WebUiSourceTests(unittest.TestCase):头像先看 performer、名字先看 creator 的话,碰上同名的 creator/performer重复实体(账本里 35 组)就会一个跳 /performers/x、另一个跳 /creators/x。"""- self.assertPageContains(- "const avatarKind=identity.kind||(performer?'performer':"- "(primaryCreator?'creator':(it.studio?'studio':'')));")- self.assertPageContains(- "const avatarName=identity.kind?identity.name:"- "(performer||primaryCreator||it.studio||who);")+ self.assertPageContains("const avatarKind=identity.kind;")+ self.assertPageContains("const avatarName=identity.name;")++ def test_missing_person_identity_uses_unassigned_on_cards_and_players(self):+ self.assertPageContains(":{kind:'',name:'未归属'});")+ self.assertPageContains("const who=(it.performers||[])[0]||it.creator||'未归属';")+ self.assertPageContains("const ownerName=cast.length?cast[0]:(full.creator||'未归属');")+ self.assertPageLacks("it.creator||it.code")+ self.assertPageLacks("full.creator||it.code")def test_narrow_search_has_a_way_out(self):"""窄屏展开搜索后必须有退出入口。@@ -5146,8 +5143,8 @@ class WebUiSourceTests(unittest.TestCase):def test_compact_card_title_is_one_line_and_identity_kind_matches_name(self):self.assertPageContains('body[data-density="dense"] .card .meta .t{display:block;max-width:100%;min-height:1.35em;overflow:hidden;')self.assertPageContains("performer?{kind:'performer',name:performer}")- self.assertPageContains("it.code?{kind:'',name:it.code}")- self.assertPageContains("it.studio?{kind:'studio',name:it.studio}")+ self.assertPageContains(":{kind:'',name:'未归属'});")+ self.assertPageLacks("it.studio?{kind:'studio',name:it.studio}")self.assertPageLacks("const whoKind=it.creator?'creator':(it.studio?'studio':'')")def test_creator_name_is_single_line_and_ellipsized(self):diff --git a/web/app.js b/web/app.jsindex 6a98934a1..93be89ad1 100644--- a/web/app.js+++ b/web/app.js@@ -1899,8 +1899,7 @@ function cardIdentity(it,linked=true){const primaryCreator=it.is_jav&&performer?'':it.creator;const identity=primaryCreator?{kind:'creator',name:primaryCreator}:(performer?{kind:'performer',name:performer}- :(it.code?{kind:'',name:it.code}- :(it.studio?{kind:'studio',name:it.studio}:{kind:'',name:'未归属'})));+ :{kind:'',name:'未归属'});const who=identity.name,whoKind=identity.kind;// 共演作品用头像提示多人,但文字只保留第一位,再给总人数。两个长名字加元数据// 会在普通卡片里折成三行;「第一位 + 等 N 人」仍能说明身份与规模。@@ -1913,9 +1912,10 @@ function cardIdentity(it,linked=true){/* 头像和名字必须落到同一个身份。各自挑 kind(头像先看 performer、名字先看creator)时,同名的 creator/performer 重复实体(账本里有 35 组)会一个跳`/performers/x`、另一个跳 `/creators/x`,同一张卡上两个入口去两个地方。 */- const avatarKind=identity.kind||(performer?'performer':(primaryCreator?'creator':(it.studio?'studio':'')));- const avatarName=identity.kind?identity.name:(performer||primaryCreator||it.studio||who);- const inner=avatarInner(avatarName,performerRef,REP[avatarName]||REP[it.creator]||REP[it.studio]);+ const avatarKind=identity.kind;+ const avatarName=identity.name;+ const inner=avatarInner(avatarName,avatarKind==='performer'?performerRef:null,+ avatarKind?REP[avatarName]:null,avatarKind||'performer');return avatarKind? link('mav',`data-entity-kind="${avatarKind}" data-entity-name="${esc(avatarName)}" title="打开${avatarKind==='performer'?esc(performerLabel(it)):'资料'}页"`,inner): `<span class="mav">${inner}</span>`;@@ -7123,7 +7123,7 @@ async function openItem(id,push=true,queueContext=null,anchor=null){const online=it.location==='online';/* 保存过的在线资产照常播;只有反查不到关注条目时才拦下来说明原因。 */const onlineGated=online&&!it.follow_item_id;- const who=it.creator||it.code||it.studio||'未归属';+ const who=(it.performers||[])[0]||it.creator||'未归属';const refs=it.entity_refs||{},studioRef=(refs.studio||[])[0];// 共演作品的女优逐行列出,每行带自己的头像;标签只写在第一行,其余留空保持对齐。const performerRefs=(refs.performer||[]).length@@ -7667,9 +7667,9 @@ async function tokShow(dir){const cast=full.performers||[];const who=cast.length? cast.slice(0,3).join('、')+(cast.length>3?` 等 ${cast.length} 人`:'')- : (full.creator||it.code||'未归属');+ : (full.creator||'未归属');const ownerKind=cast.length?'performer':(full.creator?'creator':'');- const ownerName=cast.length?cast[0]:(full.creator||it.code||'未归属');+ const ownerName=cast.length?cast[0]:(full.creator||'未归属');const ownerRef=ownerKind?(full.entity_refs?.[ownerKind]?.[0]||null):null;$('#tokAvatar').innerHTML=avatarInner(ownerName,ownerRef,REP[ownerName],ownerKind||'performer');$('#tokWho').textContent=who;diff --git a/web/css/04-manage.css b/web/css/04-manage.cssindex 6e389773c..104a87718 100644--- a/web/css/04-manage.css+++ b/web/css/04-manage.css@@ -13,7 +13,7 @@/* 判定状态用左侧色条表达:整卡描边在一列里扫过去时反而认不出来 */.reviewitem{position:relative;display:flex;flex-direction:column;box-sizing:border-box;height:var(--review-fieldset-height);margin:0;padding:0;min-width:0;overflow:hidden;background:var(--ground);border:1px solid var(--field-ring);border-radius:var(--floating-radius)}.reviewitem::before{content:'';position:absolute;z-index:3;left:0;top:0;bottom:0;width:3px;background:transparent}.reviewitem[data-decision="approved"]::before{background:var(--keep)}.reviewitem[data-decision="rejected"]::before{background:var(--drop)}.reviewitem[data-decision="skipped"]::before{background:var(--muted)}.reviewitem[data-decision="rejected"],.reviewitem[data-decision="skipped"]{opacity:.6}.reviewitem h4{margin:0 0 6px;font-size:var(--fs-lg);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.reviewitem p{margin:4px 0;color:var(--muted);font-size:var(--fs-xs);line-height:1.55;overflow-wrap:anywhere}.reviewitem>.geist-fieldset-content{flex:1;min-height:0;padding:20px}.reviewcontent{height:100%}-.reviewitem .reviewactions{flex:0 0 auto;box-sizing:border-box;min-height:56px;margin:0;padding:12px 12px 12px 20px;background:var(--page);border-top:1px solid var(--line-soft);border-radius:0 0 var(--floating-radius) var(--floating-radius);display:flex;gap:8px}+.reviewitem .reviewactions{flex:0 0 auto;box-sizing:border-box;min-height:56px;margin:0;padding:12px 12px 12px 20px;background:var(--overlay-5);border-top:1px solid var(--line-soft);border-radius:0 0 var(--floating-radius) var(--floating-radius);display:flex;gap:8px}.reviewtags{display:flex;flex-wrap:wrap;gap:5px;margin:9px 0}.reviewtags span{padding:3px 9px;border:1px solid var(--border-15);border-radius:var(--pill-radius);font-size:var(--fs-xs);color:var(--ink-2)}/* 唯一候选:纯展示,几何对齐 .revieworigin,不画单选圈。radio 仍在 DOM 里,提交路径读的就是它;只是没什么可选的时候不该让人以为还有别的选项。 */@@ -44,7 +44,7 @@.geist-fieldset-title{margin:0 0 10px;color:var(--ink);font-size:var(--fs-xl);font-weight:600}.cleanupfieldset>.geist-fieldset-footer{box-sizing:border-box;min-height:var(--fieldset-bar-h);margin:0;padding:8px 16px 8px 20px;display:flex;align-items:center;justify-content:flex-end;gap:8px;- border-top:1px solid var(--line-soft);background:var(--page)}+ border-top:1px solid var(--line-soft);background:var(--overlay-5)}/* 说明可以换行、按钮不能被压扁:窄屏下操作条仍是一行,说明占剩下的宽度,条子按内容长高(证据:vercel.com/geist/fieldset 在 375px 下操作条仍是flex-direction:row、nowrap,min-height 56px 实测长到 65/85/105px,diff --git a/web/css/12-cards.css b/web/css/12-cards.cssindex 1718aac6b..037b054a7 100644--- a/web/css/12-cards.css+++ b/web/css/12-cards.css@@ -40,7 +40,7 @@ main{position:relative;z-index:1;padding:14px 16px 90px}.count.count-actions-only{position:relative;top:auto;min-height:0;margin:0 0 16px;padding:0;justify-content:flex-end}.count.count-actions-only:empty{display:none}.resourcesync{scroll-margin-top:calc(var(--topH) + 18px);display:grid;gap:16px}.resourcesync>h2{margin:0;font-size:var(--fs-xl)}-.resourcesyncbox,.resourcepanel{overflow:clip;border:1px solid var(--field-ring);border-radius:var(--floating-radius);background:var(--ground)}.resourcesyncbody{padding:20px}.resourcesyncbody p{max-width:760px;margin:0;color:var(--muted);font-size:var(--fs-sm);line-height:1.55}.resourcesyncfooter,.resourceapplyrow{box-sizing:border-box;min-height:var(--fieldset-bar-h);display:flex;align-items:center;justify-content:flex-end;gap:16px;padding:8px 20px;border-top:1px solid var(--line-soft);background:var(--page)}.resourcesyncfooter p,.resourceapplyrow>p{margin:0;color:var(--muted);font-size:var(--fs-xs);line-height:1.5}.resourceaction{box-sizing:border-box;height:36px;padding:0 12px;border:1px solid var(--line-soft);border-radius:var(--control-radius);background:var(--ground);color:var(--ink-2);display:inline-flex;align-items:center;justify-content:center;gap:8px;flex:none;font:inherit;font-size:var(--fs-sm);font-weight:500;cursor:pointer;transition:background-color .12s,border-color .12s,color .12s}.resourceaction:hover:not(:disabled){background:var(--surface);color:var(--ink)}.resourceaction:focus-visible{outline:2px solid var(--tungsten);outline-offset:2px}.resourceaction:disabled{background:var(--sunk);border-color:var(--line-soft);color:var(--muted);cursor:default}.resourceaction svg{width:16px;height:16px;stroke:currentColor;fill:none}#resourceSyncResult:empty{display:none}.resourcescanning{margin:0;padding:14px 16px;border:1px solid var(--line-soft);border-radius:var(--control-radius);color:var(--muted)}.resourcesources{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.resourcesources article{display:grid;gap:4px;min-width:0;padding:16px}.resourcesources article+article{border-left:1px solid var(--line-soft)}.resourcesourcetitle{display:flex;align-items:center;justify-content:space-between;gap:12px}.resourcesourcetitle span{font-size:var(--fs-xs)}.resourcesources .online{color:var(--success)}.resourcesources .offline{color:var(--drop)}.resourcesources strong{margin-top:10px;font-size:var(--fs-2xl);font-variant-numeric:tabular-nums}.resourcesources small,.resourcecache small{color:var(--muted)}/* 这里是一排读数,不是又一个盒子。原先它自带填色和分格线,和下面的操作条同色,+.resourcesyncbox,.resourcepanel{overflow:clip;border:1px solid var(--field-ring);border-radius:var(--floating-radius);background:var(--ground)}.resourcesyncbody{padding:20px}.resourcesyncbody p{max-width:760px;margin:0;color:var(--muted);font-size:var(--fs-sm);line-height:1.55}.resourcesyncfooter,.resourceapplyrow{box-sizing:border-box;min-height:var(--fieldset-bar-h);display:flex;align-items:center;justify-content:flex-end;gap:16px;padding:8px 20px;border-top:1px solid var(--line-soft);background:var(--overlay-5)}.resourcesyncfooter p,.resourceapplyrow>p{margin:0;color:var(--muted);font-size:var(--fs-xs);line-height:1.5}.resourceaction{box-sizing:border-box;height:36px;padding:0 12px;border:1px solid var(--line-soft);border-radius:var(--control-radius);background:var(--ground);color:var(--ink-2);display:inline-flex;align-items:center;justify-content:center;gap:8px;flex:none;font:inherit;font-size:var(--fs-sm);font-weight:500;cursor:pointer;transition:background-color .12s,border-color .12s,color .12s}.resourceaction:hover:not(:disabled){background:var(--surface);color:var(--ink)}.resourceaction:focus-visible{outline:2px solid var(--tungsten);outline-offset:2px}.resourceaction:disabled{background:var(--sunk);border-color:var(--line-soft);color:var(--muted);cursor:default}.resourceaction svg{width:16px;height:16px;stroke:currentColor;fill:none}#resourceSyncResult:empty{display:none}.resourcescanning{margin:0;padding:14px 16px;border:1px solid var(--line-soft);border-radius:var(--control-radius);color:var(--muted)}.resourcesources{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.resourcesources article{display:grid;gap:4px;min-width:0;padding:16px}.resourcesources article+article{border-left:1px solid var(--line-soft)}.resourcesourcetitle{display:flex;align-items:center;justify-content:space-between;gap:12px}.resourcesourcetitle span{font-size:var(--fs-xs)}.resourcesources .online{color:var(--success)}.resourcesources .offline{color:var(--drop)}.resourcesources strong{margin-top:10px;font-size:var(--fs-2xl);font-variant-numeric:tabular-nums}.resourcesources small,.resourcecache small{color:var(--muted)}/* 这里是一排读数,不是又一个盒子。原先它自带填色和分格线,和下面的操作条同色,两条带子连在一起看不出边界;框里再套框也是多余的一层。 */.resourcecache{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 32px;border-top:1px solid var(--line-soft);padding:16px 20px}.resourcecache>div{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:baseline;gap:4px 16px}.resourcecache b{font-size:var(--fs-2xl);font-variant-numeric:tabular-nums}.resourcecache span{font-weight:600}.resourcecache small{grid-column:1/-1}.resourceapplyrow .resourcesyncok{color:var(--success)}.resourcedanger{color:var(--drop)}.resourcedanger:hover:not(:disabled){background:var(--drop);border-color:var(--drop);color:#fff}.resourcesyncok{margin:0;color:var(--success)}.tagbar,.count,.entitytagbar,.entitycollectionhead{transition:background-color .16s ease,border-color .16s ease}diff --git a/web/css/22-followmanage.css b/web/css/22-followmanage.cssindex ea10506bb..318cd8472 100644--- a/web/css/22-followmanage.css+++ b/web/css/22-followmanage.css@@ -16,13 +16,13 @@/* 面板上中下异色:头部条与页脚条通到卡边(负边距抵消内边距),正文是全站最亮的 --ground,两条横条落到 --page 并各带一条发丝线;圆角随卡收口。 */.fsechead{display:flex;align-items:center;gap:12px;flex-wrap:wrap;box-sizing:border-box;min-height:56px;- margin:-14px -16px 12px;padding:11px 16px;background:var(--page);+ margin:-14px -16px 12px;padding:11px 16px;background:var(--overlay-5);border-bottom:1px solid var(--line-soft);border-radius:calc(var(--surface-radius) - 1px) calc(var(--surface-radius) - 1px) 0 0}-.fsecfoot{margin:14px -16px -16px;padding:12px 16px;background:var(--page);+.fsecfoot{margin:14px -16px -16px;padding:12px 16px;background:var(--overlay-5);border-top:1px solid var(--line-soft);border-radius:0 0 calc(var(--surface-radius) - 1px) calc(var(--surface-radius) - 1px)}.fsecfoot .fnote{margin:0}/* 重复页的「操作」条独立于 .fsec 容器:自带卡面与边框,不用负边距。 */-.dupactions.fsechead{margin:0 0 14px;padding:10px 14px;background:var(--page);+.dupactions.fsechead{margin:0 0 14px;padding:10px 14px;background:var(--overlay-5);border:1px solid var(--field-ring);border-radius:var(--surface-radius)}.dupactions.fsechead button{min-height:32px;padding:0 12px;border:1px solid var(--line-soft);border-radius:var(--control-radius);background:var(--ground);color:var(--ink-2);cursor:pointer;font-size:var(--fs-sm)}