Peach: Local-first video metadata scraper and media manager.
fix(ui): 管理页标题一律对齐 1120,复核悬浮框合成一块面,详情关闭键亮色下黑底
longmeidao05af42e13f7a
diff --git a/docs/BOARD_UI.md b/docs/BOARD_UI.mdindex 508a4eda8..b75f16bd8 100644--- a/docs/BOARD_UI.md+++ b/docs/BOARD_UI.md@@ -181,11 +181,13 @@ Radial Chart Card、Bar List Card、Heatmap 与 Sankey 的 Pro 源码**未取得| 「Show N more」 | 40×20 药丸,居中贴底 4px,`border-button-default` 描边、primary 底、xs 阴影,14px 箭头,悬停 primary-hover 150ms;被折起的行直接不渲染,没有渐隐 | 同尺寸同色;列表高度不再做 240ms 过渡(上游没有高度动画,切维度标签时它会跟着抖一下);保留 48px 渐隐是主动差异 || 数据源卡的删除键 | 站上图标键 `size-9 rounded-2lg text-foreground-icon-secondary`,只过渡颜色 | 36px、圆角 10、透明底,悬停主文字色 6% 薄底加 `--drop` 文字,`transform:none` || 指标卡悬停 | 无对应 | `--surface` 与 `--ground` 在亮色里同为白,改主文字色 6% 混底 |-| 管理页标题 | 无对应 | `body body.cleanup-layout` 写错让标题一直留在 812px 窄列;四种管理布局的标题、面包屑、导语都对齐 1120,复核页容器同宽 |+| 管理页标题 | 无对应 | `body body.cleanup-layout` 写错让标题一直留在 812px 窄列;标题、面包屑、导语不看布局类一律对齐 1120(复核、高清版、重复文件这些子页没有布局类),复核页容器同宽 || 主按钮 | Button 36px、Body Medium | `.primary` 也进 36px / 圆角 10 / Body Medium 的盒子;复核底部工具条整条压 `--control-h`,主按钮跟着 || 灰卡上的控件 | secondary 底上放 primary 白底控件 | 配置页下拉、输入、图标触发键与关注页添加框都白底 || 通知状态圆 | Notification 用 lucide 图标 | 警告态换 `circle-alert`(自绘 `i-alert` 在 20px 下只剩一个点);Note 与上下留 12px |-| 复核页悬浮 | 无对应 | 标签条留在原地,工具条自己悬浮;分组条贴在它下面时两条合成一个玻璃框(上 20 0 0 / 下 0 0 20 20) |+| 复核页悬浮 | 无对应 | 标签条留在原地,工具条自己悬浮;分组条贴在它下面时两条合成一个平底玻璃框(上 20 0 0 / 下 0 0 20 20,同一块 `--glass-fill`,中间只靠 20px 间隔分开);两条都向外扩 16px 再垫回,控件与卡片同一左边 |+| 详情页关闭键 | 用户以 YouTube 为参照:播放器上的键亮色下也是黑底 | 60% 黑底白字,悬停 20% 白晕;此前亮色下白底白晕看不出悬停 |+| 数据管理骨架 | 无对应 | 扫描卡的「采集来源」「扫描并补全资料」从骨架起就都在位,内容换入只是变成可点 || 批量条 | 无对应 | Board 的 `inline-flex` 曾压过 `[hidden]`,从垃圾页回首页会多出三个键;「移入回收站」用 error 按钮同一条红色渐变,首页与垃圾页文案统一 || 媒体库菜单 | 侧向弹出的菜单贴在侧栏右缘外 8px | 收起时触发钮只有 32px,菜单从侧栏右缘起算,不再压到侧栏上 || 视频网格 | bar-list-card 之外无对应 | 去掉网格外面那一圈框,卡片直接摆在页面上 |diff --git a/frontend/src/management.ts b/frontend/src/management.tsindex c819f7fec..b0062d3d0 100644--- a/frontend/src/management.ts+++ b/frontend/src/management.ts@@ -26,7 +26,7 @@ export function cleanupSkeletonHtml(): string {<div class="geist-fieldset-content"><h3 class="geist-fieldset-title" id="cleanup-loading-${index}">${title}</h3>${description ? `<p>${description}</p>` : '<strong><span class="skeleton cleanup-count-skeleton" aria-hidden="true"></span></strong>'}${index === 5 ? '<p class="cleanupmeta"><span class="skeleton cleanup-count-skeleton" aria-hidden="true"></span></p>' : ''}</div>- <footer class="geist-fieldset-footer" data-geist-fieldset-footer><button type="button" disabled>${index === 5 ? '<svg aria-hidden="true"><use href="#i-scan-search"></use></svg><span>' + action + '</span>' : action}</button></footer>+ <footer class="geist-fieldset-footer" data-geist-fieldset-footer>${index === 0 ? '<a class="geist-button" href="/scraping">采集来源</a>' : ''}<button type="button"${index === 0 ? ' class="geist-button primary"' : ''} disabled>${index === 5 ? '<svg aria-hidden="true"><use href="#i-scan-search"></use></svg><span>' + action + '</span>' : action}</button></footer></section>`).join('')}</div></div>`;}diff --git a/frontend/test/management.test.ts b/frontend/test/management.test.tsindex a31d61e98..9862f17b8 100644--- a/frontend/test/management.test.ts+++ b/frontend/test/management.test.ts@@ -28,6 +28,9 @@ describe('数据管理首屏', () => {}expect(cards[0]?.querySelector('p')?.textContent).toBe('扫描媒体文件夹,导入已有资料,采集缺失信息。');expect(cards[0]?.querySelector('.skeleton')).toBeNull();+ // 扫描卡的两枚键从骨架起就都在位,内容换入时只是变成可点。+ expect(cards[0]?.querySelector('.geist-fieldset-footer > a.geist-button')?.getAttribute('href')).toBe('/scraping');+ expect(cards[0]?.querySelector('.geist-fieldset-footer > button.geist-button.primary')?.hasAttribute('disabled')).toBe(true);expect(root.querySelectorAll('.cleanup-count-skeleton')).toHaveLength(7);expect(root.querySelector('#resource-sync')).toBeNull();});diff --git a/tests/test_web_ui.py b/tests/test_web_ui.pyindex bf5184277..0b15ba366 100644--- a/tests/test_web_ui.py+++ b/tests/test_web_ui.py@@ -5379,9 +5379,11 @@ class WebUiSourceTests(unittest.TestCase):self.assertIn("body.configuration-layout .configpage :is(.gselectfield,.geist-input,input.geist-input,.board-icon-trigger),body .followmanage .faddform .geist-search input{background:var(--color-background-primary-default)}", board)self.assertIn("body .review{width:100%;max-width:var(--board-content);margin:0 auto;box-sizing:border-box}", board)self.assertIn("body .review .reviewcontrols{position:static;", board)- self.assertIn("body .review .reviewbulktoolbar{position:sticky;top:var(--topH);z-index:60;", board)- self.assertIn("body .review:has(.reviewgroupbar.is-stuck) .reviewbulktoolbar.is-stuck{border-radius:20px 20px 0 0}", board)- self.assertIn("body .review .reviewgroupbar.is-stuck{border-radius:0 0 20px 20px;", board)+ self.assertIn("body .review .reviewbulktoolbar{position:sticky;top:var(--topH);z-index:60;margin:0 -16px 16px;padding:12px 16px;", board)+ self.assertIn("body .review .reviewgroupbar{margin-inline:-16px;padding-inline:16px}", board)+ self.assertIn("body .review:has(.reviewgroupbar.is-stuck) .reviewbulktoolbar.is-stuck{border-radius:20px 20px 0 0;box-shadow:inset 0 1px 0 var(--glass-rim)}", board)+ self.assertIn("body .review .reviewgroupbar.is-stuck{background:var(--glass-fill);border-radius:0 0 20px 20px;", board)+ self.assertIn(".closestage,.closestage:hover{background:rgba(0,0,0,.6);color:#fff}", board)self.assertIn("body .batchbar button[hidden],body .batchbar button.danger[hidden]{display:none}", board)self.assertIn("body .batchbar button.danger{", board)self.assertIn("background:linear-gradient(180deg,#ff3347,#e60012);color:#fff;font:var(--board-body-medium);", board)@@ -5477,7 +5479,7 @@ class WebUiSourceTests(unittest.TestCase):self.assertIn(".board-ranked-chart.board-chart-visible .board-rank-fill,.tasteranks.board-chart-visible .taste-rank-track i""{animation:board-grow-x 1.2s cubic-bezier(.22,.61,.36,1) both}", board)self.assertIn(".board-radar.board-chart-visible .board-radar-value{animation:board-grow-radar 1.2s cubic-bezier(.22,.61,.36,1) both}", board)- self.assertIn("body:is(.cleanup-layout,.follow-manage-layout,.insight-layout,.configuration-layout) :is(#manageTitle,#manageCrumb,#manageLede){max-width:var(--board-content);", board)+ self.assertIn("body :is(#manageTitle,#manageCrumb,#manageLede){max-width:var(--board-content);width:100%;margin-left:auto;margin-right:auto}", board)self.assertIn("body .reviewactions button.warning:not(:disabled){background:#bfdbfe;color:#1e40af;border-color:transparent}", board)self.assertIn(".drawer .board-sidebar-head #filterBtn{border-radius:0;color:var(--color-text-secondary);", board)self.assertIn(".stage .vwrap{border-radius:var(--surface-radius) 0 0 0}", board)diff --git a/web/board.css b/web/board.cssindex 9f9ea8646..a989881f8 100644--- a/web/board.css+++ b/web/board.css@@ -119,7 +119,7 @@ body.drawer-open{--railW:296px}.managebar .managebar-menu button[aria-pressed="true"]{background:none;color:var(--tungsten);border-bottom-color:var(--tungsten);font-weight:500}.managebar .managebar-menu button:hover{background:none;color:var(--ink)}.managebar .managebar-menu button[aria-pressed="true"]:hover{color:var(--tungsten)}-body:is(.cleanup-layout,.follow-manage-layout,.insight-layout,.configuration-layout) :is(#manageTitle,#manageCrumb,#manageLede){max-width:var(--board-content);width:100%;margin-left:auto;margin-right:auto}+body :is(#manageTitle,#manageCrumb,#manageLede){max-width:var(--board-content);width:100%;margin-left:auto;margin-right:auto}#manageTitle{font-size:26px;line-height:34px;margin-bottom:24px}/* Task entry cards and editing panels have different information density. */@@ -757,10 +757,11 @@ body .library-processing [role=alert]>.geist-note{margin-top:12px}/* 复核页与别的管理页同宽;标签条不悬浮,悬浮的是工具条这一层,分组条贴在它下面合成一个玻璃框。 */body .review{width:100%;max-width:var(--board-content);margin:0 auto;box-sizing:border-box}body .review .reviewcontrols{position:static;z-index:auto;padding-block:0;display:block;border-radius:0}-body .review .reviewbulktoolbar{position:sticky;top:var(--topH);z-index:60;padding-block:12px;margin-bottom:16px;border-radius:20px;transition:border-radius .15s ease}-body .review .reviewbulktoolbar.is-stuck{background:linear-gradient(125deg,var(--glass-sheen),transparent 42%,var(--glass-low)),var(--glass-fill);backdrop-filter:var(--glass-optic,blur(22px)) saturate(145%);border:0;box-shadow:inset 0 1px 0 var(--glass-rim),var(--glass-shadow)}-body .review:has(.reviewgroupbar.is-stuck) .reviewbulktoolbar.is-stuck{border-radius:20px 20px 0 0}-body .review .reviewgroupbar.is-stuck{border-radius:0 0 20px 20px;box-shadow:var(--glass-shadow)}+body .review .reviewbulktoolbar{position:sticky;top:var(--topH);z-index:60;margin:0 -16px 16px;padding:12px 16px;border-radius:20px;transition:border-radius .15s ease}+body .review .reviewgroupbar{margin-inline:-16px;padding-inline:16px}+body .review .reviewbulktoolbar.is-stuck{background:var(--glass-fill);backdrop-filter:var(--glass-optic,blur(22px)) saturate(145%);border:0;box-shadow:inset 0 1px 0 var(--glass-rim),var(--glass-shadow)}+body .review:has(.reviewgroupbar.is-stuck) .reviewbulktoolbar.is-stuck{border-radius:20px 20px 0 0;box-shadow:inset 0 1px 0 var(--glass-rim)}+body .review .reviewgroupbar.is-stuck{background:var(--glass-fill);border-radius:0 0 20px 20px;box-shadow:var(--glass-shadow)}/* 批量条:隐藏的键真的隐藏(Board 的 inline-flex 曾压过 hidden);「加入回收站」用 error 按钮的红色渐变。 */body .batchbar button.danger{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;gap:4px;height:36px;min-height:36px;padding:8px 12px;border:1px solid transparent;border-radius:10px;background:linear-gradient(180deg,#ff3347,#e60012);color:#fff;font:var(--board-body-medium);transition:background-color .15s ease}body .batchbar button.danger:hover{background:linear-gradient(180deg,#ff6471,#ff3347);color:#fff}@@ -778,3 +779,7 @@ body .batchbar button[hidden],body .batchbar button.danger[hidden]{display:none}.drawer .board-sidebar-head #filterBtn{width:20px;height:20px;padding:0;background:none;box-shadow:none}.drawer .board-sidebar-head #filterBtn:hover{background:none;color:var(--color-text-primary)}@media(min-width:761px){.drawer:not(.open) .board-sidebar-head{min-height:0;gap:10px;align-items:center;justify-content:flex-start}.drawer:not(.open) .board-sidebar-head #filterBtn{width:36px;height:20px}.drawer:not(.open) #brandHome{width:32px;height:32px;min-height:32px;padding:0;max-width:none}.drawer:not(.open) #brandHome .mark{width:32px;height:32px}}+/* 详情页的关闭键压在画面上:亮色主题下白底白晕看不出悬停,用户以 YouTube 为参照——播放器上的键在亮色下也是黑底。 */+.closestage,.closestage:hover{background:rgba(0,0,0,.6);color:#fff}+.closestage:hover:after,.closestage:focus-visible:after{background:rgba(255,255,255,.2)}+.closestage:active:after{background:rgba(255,255,255,.3)}diff --git a/web/dist/peach-ui.js b/web/dist/peach-ui.jsindex 2d2caf108..f2f482e8c 100644--- a/web/dist/peach-ui.js+++ b/web/dist/peach-ui.js@@ -812,7 +812,7 @@ function ht() {<div class="geist-fieldset-content"><h3 class="geist-fieldset-title" id="cleanup-loading-${r}">${e}</h3>${n ? `<p>${n}</p>` : "<strong><span class=\"skeleton cleanup-count-skeleton\" aria-hidden=\"true\"></span></strong>"}${r === 5 ? "<p class=\"cleanupmeta\"><span class=\"skeleton cleanup-count-skeleton\" aria-hidden=\"true\"></span></p>" : ""}</div>- <footer class="geist-fieldset-footer" data-geist-fieldset-footer><button type="button" disabled>${r === 5 ? "<svg aria-hidden=\"true\"><use href=\"#i-scan-search\"></use></svg><span>" + t + "</span>" : t}</button></footer>+ <footer class="geist-fieldset-footer" data-geist-fieldset-footer>${r === 0 ? "<a class=\"geist-button\" href=\"/scraping\">采集来源</a>" : ""}<button type="button"${r === 0 ? " class=\"geist-button primary\"" : ""} disabled>${r === 5 ? "<svg aria-hidden=\"true\"><use href=\"#i-scan-search\"></use></svg><span>" + t + "</span>" : t}</button></footer></section>`).join("")}</div></div>`;}function gt(e, t = !1, n = !1) {