Peach: Local-first video metadata scraper and media manager.
feat(follow): 关注列表改成默认视图与表格视图
longmeidao09808abc012e
diff --git a/docs/BOARD_UI.md b/docs/BOARD_UI.mdindex 9357c976e..d12d02c1a 100644--- a/docs/BOARD_UI.md+++ b/docs/BOARD_UI.md@@ -87,13 +87,32 @@ Radial Chart Card、Bar List Card、Heatmap 与 Sankey 的 Pro 源码**未取得| typography.json | 5b7eca25350829755eb15cb474ab009fd1f8b929e62d54182f648b4f2e97bf8e || stat-cards.json | 3a140eeb9ab4ebc327e0e585f6cd6e4331be3e68694e72ec6aab80fd5adf705c |+### 关注列表的表格视图(2026-09-08)++取证来源是 https://www.boardui.com/components/data-table 的实时 DOM 与样式表:`_next/static/chunks/0n0ugaibgw__p.css`(SHA-256 `a856db5e9e1a58b2e32b7bfa6d7f1cab69dd09e4bd7ac22fc455dd10b525cf27`)里的 `.bui-table` 规则,以及公开注册表 `r/table.json`(`fc12a8f2f4012d9e983e0b9bbb10f9fe3288d74046566d2623d60e7056c50d88`)和 `r/data-table.json`(`613299eca0f448460a546f7959feab8dab19fbfd6e18670f7216ff304a1e3574`)。++| 上游实测 | Peach 表格视图 |+| --- | --- |+| `th`/`td` 内边距 `--spacing`×3 / ×2.5,实测 10px 12px;`vertical-align:middle` | 同值 |+| 字阶 `text-body-medium`,实测 14/20、500;表头 `--color-text-tertiary`,正文 `--color-text-primary` | 同值;Board 层用同名 token,旧版层用 `--muted`/`--ink` |+| 表格摆在 `--color-background-primary-default` 面上;表头 `--color-background-secondary-default` 底,上下各一条 `--color-separator-border` | 同值。外框不用作者卡那块 `--ground`:Board 层把它定成 secondary,与表头同色 |+| `tbody tr` 只有一条下边线,悬停不换底(实测 `rgba(0,0,0,0)`) | 同值 |+| 行焦点 `data-focus-visible` 内嵌 2px 焦点环 | 未采用:Peach 的行不可聚焦,焦点落在格子里的控件上 |+| `bui-table-sm` 紧凑档(10px 6px、`text-body-2-medium`)与表尾 Normal/Compact 分段器 | 不采用:视图开关本身就是密度选择 |+| 表头首格全选复选框,带 indeterminate | 不采用:全选连着批量动作留在列表上方的选择栏,避免两个全选框 |+| 分页底部 Previous/Next | 不采用:关注列表一次全量 |+| 可排序表头带 `ChevronSortDown` 字形 | 表头两列接入工具栏已有的两种排序;方向字形沿用工具栏的 `arrow-up`/`arrow-down` |+| 表格 `min-w-[1000px]`,外层 `overflow-x-auto` | `min-width:760px`,外层横向滚动,窄屏不折叠列 |++选中行的样式上游页面没有暴露出来(复选框选中后 `tr` 无 `data-selected`),Peach 沿用 Board 层已有的 `.fsource.selected`。+## 验证记录侧栏采用 AI chat 公开变体的分组标题、展开叶项与尾部计数;分组箭头位于右侧,标题高 36px,展开复用共享 Collapse。媒体库入口适配公开 `DashboardUserMenu`:265px 面板、16px 圆角、10px 内边距,桌面右侧 8px、手机下方展开,150ms ease-out 淡入、缩放 .95 与 2px 模糊。独立按钮控制侧栏展开;媒体库图标打开选择面板,展开面板时入口显示轮廓。首页使用 20px 槽位的 Peach logo,按透明边距校准可见轮廓及文字起点,收起态按钮为 36px 正方形。媒体库与导航图标统一 20px、1.7px 线宽,无图标底色。设置固定在底部,与明暗开关并排;收起时明暗开关只显示目标主题图标。主题动画参考公开 `https://www.boardui.com/r/theme-toggle.json`:200ms 滑块与 820ms 柔边扩散,缓动 `cubic-bezier(.16,1,.3,1)`,减少动态效果时直接切换。媒体库使用 `[media.libraries]` 为声明路径命名,同名路径归为一库;`[media.library_icons]` 保存可选图标,自动模式按来源显示本地磁盘或本机提供的网盘图标。库选择限定作品列表与筛选项;来源 ID、挂载映射和 ledger 路径保留其业务含义。统计、口味和维护任务按整个部署汇总。预览只读,不保存真实配置。-颜色按 [Board Color](https://www.boardui.com/components/color) 的文字、背景、边框和交互角色映射;字阶按 [Typography](https://www.boardui.com/components/typography) 使用正文 14/20、紧凑 13/18、说明 12/16、标题 20/26 与页面标题 32/44。本机打包 Inter Variable。统计、口味、关注管理和配置使用对应结构的骨架;其它页面复用实体、海报与网格骨架的 Board 样式。关注的宽松与紧凑模式共享作者分组、排序和多选;行高分别为 64px 和 48px,宽松模式支持作者收起;批量删除使用数量明确的确认框,选择与启用状态独立;最近观看标题单行中间省略并链接视频详情。+颜色按 [Board Color](https://www.boardui.com/components/color) 的文字、背景、边框和交互角色映射;字阶按 [Typography](https://www.boardui.com/components/typography) 使用正文 14/20、紧凑 13/18、说明 12/16、标题 20/26 与页面标题 32/44。本机打包 Inter Variable。统计、口味、关注管理和配置使用对应结构的骨架;其它页面复用实体、海报与网格骨架的 Board 样式。关注的默认视图与表格视图共享作者分组、排序和多选;默认视图作者卡内行高 64px 并支持作者收起,表格视图一行一条来源、表头可排序;批量删除使用数量明确的确认框,选择与启用状态独立;最近观看标题单行中间省略并链接视频详情。详情使用并列观看进度卡与独立动作按钮;Esc 先退出详情、再收起侧栏。首页与实体页排序保持横向滚动,换批按钮沿用动画 SVG,采用中性 Board 按钮。diff --git a/docs/PRODUCT_BACKLOG.md b/docs/PRODUCT_BACKLOG.mdindex 5ac1bee30..47f1b71af 100644--- a/docs/PRODUCT_BACKLOG.md+++ b/docs/PRODUCT_BACKLOG.md@@ -10,7 +10,7 @@统计与口味已接入 Stat Cards、可展开排名、雷达、媒体库与网盘环形卡;浏览历史支持时间范围、真实访问热图和网站到创作者线索的流向。侧栏使用同一导航的 60/260px 宽窄态,手机从左侧滑入。设置滚动渐隐、手机输入字号、焦点环留白及登录保持时长已接入。Pro 组件使用公开行为的独立适配,范围见 [Board 适配](BOARD_UI.md)。-侧栏底部固定设置和明暗开关,顶部独立按钮控制展开;媒体库图标负责打开选择面板,首页入口使用 Peach logo。路径可命名分组并选择图标,网盘默认图标由本机提供;库选择限定作品列表与筛选项。统计、口味和维护任务保持全局。关注提供宽松与紧凑排版,共享作者分组、排序、多选和批量删除;宽松模式可收起作者,最近观看标题可跳转视频。详情优先响应 Esc,手机排序栏可横向滚动。预览不保存真实配置。+侧栏底部固定设置和明暗开关,顶部独立按钮控制展开;媒体库图标负责打开选择面板,首页入口使用 Peach logo。路径可命名分组并选择图标,网盘默认图标由本机提供;库选择限定作品列表与筛选项。统计、口味和维护任务保持全局。关注提供默认视图与表格视图,共享作者分组、排序、多选和批量删除;默认视图可收起作者,表格视图表头可排序,最近观看标题可跳转视频。详情优先响应 Esc,手机排序栏可横向滚动。预览不保存真实配置。## 已有骨架、尚未完成(6 项)diff --git a/scripts/vendor_web_dependencies.mjs b/scripts/vendor_web_dependencies.mjsindex 8a88fd989..7b9d67260 100644--- a/scripts/vendor_web_dependencies.mjs+++ b/scripts/vendor_web_dependencies.mjs@@ -101,6 +101,8 @@ const lucideIcons = new Map([["notebook-pen", "notebook-pen"], ["search-x", "search-x"],["file-archive", "file-archive"], ["file-audio", "file-audio"],["file-stack", "file-stack"],+ // 关注列表的表格视图:行列格子,和「默认视图」那枚网格并排。+ ["table", "table"],// 名字和上游对不上的只有排序键:Peach 叫 `sort`,Lucide 叫 `sort-desc`。["sort", "sort-desc"], ["arrow-up", "arrow-up"], ["arrow-down", "arrow-down"],["calendar", "calendar"], ["download", "download"], ["monitor", "monitor"],diff --git a/tests/test_follow_web.py b/tests/test_follow_web.pyindex 1ac933650..41fa3cd4c 100644--- a/tests/test_follow_web.py+++ b/tests/test_follow_web.py@@ -1581,6 +1581,12 @@ class FollowWebSourceTests(unittest.TestCase):if needle not in self.page:self.fail(f"Web 表面缺少:{needle!r}" + (f"({message})" if message else ""))+ def assertBoardContains(self, needle):+ # Board 层的覆盖单独一张表,不在上面那份页面里;按 test_web_ui 的写法直接读它。+ board = (ROOT / "web" / "board.css").read_text(encoding="utf-8")+ if needle not in board:+ self.fail(f"board.css 缺少:{needle!r}")+def test_follow_task_controls_keep_content_and_name_the_author(self):self.assertPageContains('data-follow-sources=')self.assertPageContains('group.filter(s=>s.enabled).map(s=>s.id)')@@ -1725,7 +1731,7 @@ class FollowWebSourceTests(unittest.TestCase):self.assertPageContains('class="frows fsources"')grid = self.page[self.page.index(".fsources{"):]self.assertIn("repeat(auto-fit,minmax(430px,1fr))", grid[:grid.index("}")])- self.assertPageContains("followAuthorGroups(sources).map(followAuthorBlock).join('')")+ self.assertPageContains("groups.map(followAuthorBlock).join('')")self.assertNotIn(".fsources>.fauthor{display:grid", self.page,"多栏单位是作者组,不能拆开作者下面的来源行")self.assertPageContains('class="fsourcelink externallink" href="${esc(source.url)}"')@@ -1743,7 +1749,7 @@ class FollowWebSourceTests(unittest.TestCase):self.assertPageContains("wireScrollers(root)")def test_source_actions_are_icon_only_and_stay_on_one_row(self):- row = self.page[self.page.index("function followSourceRow(source,selectable=false)"):]+ row = self.page[self.page.index("function followSourceCells(source,selectable=false)"):]row = row[:row.index("function followAliasManager")]self.assertIn("data-follow-check", row)self.assertIn("data-follow-remove", row)@@ -2129,76 +2135,114 @@ class FollowWebSourceTests(unittest.TestCase):self.assertPageContains(".fcred .ficon{margin-right:0}")self.assertIn('data-drop="self"', self.page)- def test_the_follow_list_has_author_and_selectable_source_views(self):- """两个互斥视图用 Switch(共享 name 的 radio),不是 Toggle。"""+ def test_the_follow_list_has_a_default_view_and_a_table_view(self):+ """两个互斥视图用 Switch(共享 name 的 radio),不是 Toggle。++ 默认视图按作者分卡,表格视图一行一条来源。两种视图的 DOM 不同,切换走排序那条+ 重画路径:拿手里这份 followData 重画,不重取接口、不换骨架;勾选与收起的作者+ 各记在自己的 Set 里,重画后都还在。+ """self.assertPageContains(- "const FOLLOW_LAYOUTS=[['cozy','宽松','layout-grid'],"- "['compact','紧凑','list-filter']]")+ "const FOLLOW_LAYOUTS=[['default','默认视图','layout-grid'],['table','表格视图','table']]")+ self.assertPageContains('<symbol id="i-table" viewBox="0 0 24 24">')self.assertPageContains(- "iconSwitchHtml('follow-layout','关注列表版式',FOLLOW_LAYOUTS,followListLayout()")+ "iconSwitchHtml('follow-layout','关注列表视图',FOLLOW_LAYOUTS,followListLayout()")self.assertPageContains("{attr:'data-follow-layout'}")self.assertPageContains("${followLayoutButtons()}")self.assertPageContains("wireIconSwitch(root,'data-follow-layout',setFollowListLayout)")- # 版式是纯展示层的事:改容器上的一个属性就够,不重画列表,也不重新请求。- self.assertPageContains('<div class="frows fsources" data-layout="${followListLayout()}">')- self.assertPageContains("node.dataset.layout=followListLayout()")+ self.assertPageContains('<div class="frows fsources" data-layout="${followListLayout()}">${sourceList}</div>')+ self.assertPageContains(+ "const sourceList=followListLayout()==='table'?followSourceTable(groups,!legacy)")+ self.assertPageContains(" renderFollowManage(followCredentials||{});\n}\n\n/* 版式判据来自")+ self.assertPageContains("const collapsed=!legacy&&collapsedFollowAuthors.has(key);")self.assertPageContains("group.map(source=>followSourceRow(source,!legacy))")self.assertPageContains("data-follow-selection-remove")self.assertPageContains("data-follow-author-toggle")self.assertPageContains("button.disabled=!ids.length||!!followRuntime?.ledger_read_only")- # 紧凑就是一行两个;半幅宽度放不下六列,见 test_compact_rows_keep_the_favicon…。- self.assertPageContains(- '.fsources[data-layout="compact"]{grid-template-columns:repeat(2,minmax(0,1fr))}')- # 窄屏两栏塞不下,仍旧回到一栏——媒体查询要连紧凑一起覆盖,否则属性选择器更具体。- self.assertPageContains('.fsources,.fsources[data-layout="compact"]{grid-template-columns:1fr}')- # 窄屏两栏不成立,开关一起收起,不留一个按了没反应的控件。- self.assertPageContains('.fsechead .iconswitch{display:none}')- # 属性可能还留着上次在宽屏选的 compact;窄屏是整幅一栏,站名不该再收成图标。- self.assertPageContains(- '.fsources[data-layout="compact"] .fsource .fprovider:has(.ficon)>span{display:inline}')- self.assertPageContains(- '.fsources[data-layout="compact"] .fsource .fprovider:has(.ficon) .ficon{margin-right:5px}')- # 选择要留下来,和 JAV 版式一样存进设置。- self.assertPageContains("followLayout:'cozy'")+ # 选择要留下来,和 JAV 版式一样存进设置;存过旧值的机器落回默认视图。+ self.assertPageContains("followLayout:'default'")self.assertPageContains("appSettings.followLayout=value")self.assertPageContains(- "allowedSetting(appSettings.followLayout,FOLLOW_LAYOUTS.map(([k])=>k),'cozy')")-- def test_compact_rows_keep_the_favicon_and_a_clock_without_the_year(self):- """紧凑半幅腾地方的办法是压缩两列,不是删掉一列。-- 来源那格收成一枚 favicon——图标已经指认了站点,站名是重复的;上次检查整列回来,- 只去掉年份,因为看的是最近有没有检查过,年份是这串里最不影响判断的一段。+ "allowedSetting(appSettings.followLayout,FOLLOW_LAYOUTS.map(([k])=>k),'default')")+ # 表格在任何宽度都成立,开关不再按宽度收起。+ self.assertPageLacks('.fsechead .iconswitch{display:none}')+ # 宽屏两栏只归默认视图。+ self.assertBoardContains(+ '.followmanage .fsources[data-layout="default"] .board-follow-list{grid-template-columns:repeat(2,minmax(0,1fr))')++ def test_both_views_render_the_same_source_cells(self):+ """一条来源的格子只有一份模板:默认视图排成一行,表格视图各放一个 <td>。++ 勾选、检查、移除的 data 属性两边一样,wireFollowManage 不分视图;表格里的+ `<tr>` 顶着 `fsource` 类,`field.closest('.fsource')` 在两种视图里都找得到行。"""- # 版式切换只翻容器上的属性、不重画列表,所以两种显示得出自同一份 DOM。- self.assertPageContains('<i class="fyear">${esc(text.slice(0,5))}</i>${esc(text.slice(5))}')- self.assertPageContains("${source.last_checked_at?localTimeHtml(source.last_checked_at):'未检查'}")+ self.assertPageContains("function followSourceCells(source,selectable=false){")self.assertPageContains(- '.fsources[data-layout="compact"] .fsource .fchecked .fyear{display:none}')- # <i> 是包一层用的,不是排版意图。+ "return {className:`fsource${bad?' bad':''}${source.enabled?'':' disabled'}`,"+ "check,name,provider,status,checked,actions,error};")+ self.assertPageContains("const cell=followSourceCells(source,selectable);\n return `<div class=\"frow ${cell.className}\">")+ self.assertPageContains("${cell.provider(selectable?cell.status:'')}")+ self.assertPageContains("return `<tr class=\"${cell.className}\">")+ self.assertPageContains('<td class="ftcheck">${cell.check}</td>')+ self.assertPageContains('<td class="ftname">${cell.name}${cell.error}</td>')+ self.assertPageContains('<td class="ftprovider">${cell.provider(\'\')}</td>')+ self.assertPageContains('<td class="ftstatus">${cell.status}</td>')+ self.assertPageContains('<td class="ftactions">${cell.actions}</td></tr>')+ self.assertPageContains("selectable.forEach(field=>field.closest('.fsource').classList.toggle('selected',field.checked))")+ # 时间格两边同一个写法,<i> 只是包一层,不是排版意图。+ self.assertPageContains('<i class="fyear">${esc(text.slice(0,5))}</i>${esc(text.slice(5))}')self.assertPageContains(".fsource .fchecked .fyear{font-style:normal}")- # 时间列回来后名字那格只剩 118px,35 条里 11 条被截;列间距收到 8px 换回 10px。- self.assertPageContains('.fsources[data-layout="compact"] .fsource.frow{gap:8px}')- # 站名收起,但仍在 DOM 里,并且悬停能看到。self.assertPageContains('<span class="fmeta fprovider" title="${esc(source.provider_label)}">')- self.assertPageContains("<span>${esc(source.provider_label)}</span>${selectable?statusChip:''}</span>")- self.assertPageContains(- '.fsources[data-layout="compact"] .fsource .fprovider:has(.ficon)>span{display:none}')- # 图标右边那 5px 是给站名留的间距,站名收起后跟着去掉。- self.assertPageContains(- '.fsources[data-layout="compact"] .fsource .fprovider:has(.ficon) .ficon{margin-right:0}')+ self.assertPageContains("function sourceIcon(provider){return SOURCE_ICON_PROVIDERS.has(provider)")- def test_a_source_without_a_favicon_keeps_its_name_in_compact(self):- """`:has(.ficon)` 是这条规则的全部要害,不能写成无条件隐藏。+ def test_the_table_view_follows_the_boardui_data_table(self):+ """表格视图的数值取自 boardui.com/components/data-table 的 `.bui-table`,登记在 docs/BOARD_UI.md。- 没登记 favicon 的站 `sourceIcon` 直接返回空串;取得下来但加载失败的那些,- 全局兜底会按 `data-drop="self"` 把 `<img>` 整个摘掉——两种情况下无条件隐藏- 站名都会留下一格纯空白。`:has` 在 img 被摘掉后会重新求值。+ 表头与格子 10px 12px 内边距、14/20、竖直居中;表头 500 字重、次要字色、次级底色、+ 上下各一条分隔线;正文行只有一条下边线。它有而这里不要的三样写在 followSourceTable+ 的注释里:页码、表尾密度档、表头全选。窄屏照它的做法横向滚动,不折叠列。"""- self.assertPageContains(':has(.ficon)>span{display:none}')- self.assertIn('data-drop="self"', self.page)- self.assertPageContains("function sourceIcon(provider){return SOURCE_ICON_PROVIDERS.has(provider)")+ self.assertPageContains(+ '<div class="ftablewrap"><table class="ftable"><thead><tr>')+ self.assertPageContains('<th scope="col"><span class="sr-only">${selectable?\'选择\':\'启用\'}</span></th>')+ self.assertPageContains('<th scope="col">来源</th><th scope="col">站点</th><th scope="col">状态</th>')+ self.assertPageContains('<th scope="col"><span class="sr-only">操作</span></th></tr></thead><tbody>${rows}</tbody></table></div>')+ self.assertPageContains(".ftablewrap{overflow-x:auto;overscroll-behavior-x:contain}")+ self.assertPageContains(+ ".ftable{width:100%;min-width:760px;border-collapse:collapse;text-align:left;font-size:var(--fs-md);line-height:20px}")+ self.assertPageContains(".ftable th,.ftable td{padding:10px 12px;vertical-align:middle}")+ self.assertPageContains(".ftable th{font-weight:500;white-space:nowrap;color:var(--muted);background:var(--sunk);")+ self.assertPageContains("border-top:1px solid var(--line-soft);border-bottom:1px solid var(--line-soft)}")+ self.assertPageContains(".ftable tbody tr{border-bottom:1px solid var(--line-soft)}")+ self.assertPageContains(".ftable tbody tr:last-child{border-bottom:0}")+ # Board 层换成 boardui 同名 token。外框是 primary 底:Board 层的 --ground 就是 secondary,+ # 和表头同色,表头那条带子会消失;boardui 的表格本来就摆在 primary 面上。+ self.assertBoardContains(+ ".followmanage .ftablewrap{border-radius:var(--surface-radius);background:var(--color-background-primary-default)}")+ self.assertBoardContains(+ ".followmanage .ftable th{color:var(--color-text-tertiary);background:var(--color-background-secondary-default);border-color:var(--color-separator-border)}")++ def test_the_table_header_sorts_by_the_toolbar_sort_keys(self):+ """能点的两列对应工具栏里已有的排序,只是多一个入口,不另造一套顺序。++ 再点当前列翻方向,点另一列换列并回到该列默认方向;`aria-sort` 只标当前列,+ 方向字形沿用工具栏那对箭头。+ """+ self.assertPageContains("const FOLLOW_TABLE_SORT={author:'name',checked:'checked'};")+ self.assertPageContains("${followTableHeader('author','作者')}")+ self.assertPageContains("${followTableHeader('checked','上次检查')}")+ self.assertPageContains(+ '<th scope="col" aria-sort="${active?(ascending?\'ascending\':\'descending\'):\'none\'}">'+ '<button type="button" class="ftsort" data-follow-table-sort="${sort}" aria-label="按${label}排序">'+ "${label}${icon(ascending?'arrow-up':'arrow-down')}</button></th>")+ self.assertPageContains(+ "if(followManageSort===sort)followManageDir=followManageDir==='asc'?'desc':'asc';\n"+ " else{followManageSort=sort;followManageDir=FOLLOW_SORT_DEFAULT_DIR[sort]||'desc'}\n"+ " routeFollowManageSort();")+ self.assertPageContains(+ 'th[aria-sort="ascending"] .ftsort svg,th[aria-sort="descending"] .ftsort svg{opacity:1}')+ self.assertPageContains(".ftsort:focus-visible{outline:2px solid var(--tungsten);outline-offset:2px}")def test_the_layout_switch_lines_up_with_the_sort_box(self):"""开关和排序框、按钮同处分区标题行,高度必须是同一档。"""@@ -2712,7 +2756,8 @@ class FollowWebSourceTests(unittest.TestCase):"""self.assertPageContains("function followAuthorGroups(sources)")self.assertPageContains("source.author_key")- self.assertPageContains("followAuthorGroups(sources).map(followAuthorBlock)")+ self.assertPageContains("const groups=followAuthorGroups(sources);")+ self.assertPageContains("groups.map(followAuthorBlock)")# 组标题用作者本人的名字:四条来源合成一组之后还挂着其中一条的平台后缀,# 等于说这一组只属于 fanbox,正是这次要消掉的误读。self.assertPageContains("function followAuthorName(group)")diff --git a/tests/test_web_ui.py b/tests/test_web_ui.pyindex 80d66e174..39a18721a 100644--- a/tests/test_web_ui.py+++ b/tests/test_web_ui.py@@ -6766,7 +6766,10 @@ class WebUiSourceTests(unittest.TestCase):".fbulkcounts",".fchip", ".followpageaction .fmeta", ".fpickactions [data-pick-state]",".fsechead .fmeta",- ".frow>b", ".fvkind", ".idname", ".kv>span:first-child",+ ".frow>b",+ # 表格视图的来源名一格:和默认视图那枚 `.frow>b` 是同一段语义文本,只是换了容器。+ ".ftable .ftname>b",+ ".fvkind", ".idname", ".kv>span:first-child",".meta .t", ".meta .who", ".mixcopy b,.mixcopy span",# 小窗信息栏与播放器右键菜单:标题、来源和菜单标签都是语义文本,尾部省略。".miniplayertitle", ".miniplayersub", ".playermenuitem>span",diff --git a/web/app.js b/web/app.jsindex 687033a49..a4cb045b4 100644--- a/web/app.js+++ b/web/app.js@@ -411,7 +411,7 @@ const THEME_CHOICES=['system','light','dark'];const JAV_LAYOUTS=[['big','大图','maximize'],['small','小图','layout-grid']];/* 显示器用于跟随系统主题和详情页的画面分辨率。 */const THEME_OPTIONS=[['system','跟随系统','monitor'],['light','浅色','sun'],['dark','深色','moon']];-const DEFAULT_SETTINGS={batchSize:60,defaultSort:'seed',sortDefaultsVersion:3,hoverDelaySeconds:5,seekSeconds:10,searchHistoryLimit:10,relatedLimit:20,javLayout:'big',javImage:'cover',followLayout:'cozy',peopleLayout:'big',ambientMode:true,miniplayer:true,theaterMode:false,theme:'system',groupCollapse:true,sidebarOrder:DEFAULT_SIDEBAR_ORDER};+const DEFAULT_SETTINGS={batchSize:60,defaultSort:'seed',sortDefaultsVersion:3,hoverDelaySeconds:5,seekSeconds:10,searchHistoryLimit:10,relatedLimit:20,javLayout:'big',javImage:'cover',followLayout:'default',peopleLayout:'big',ambientMode:true,miniplayer:true,theaterMode:false,theme:'system',groupCollapse:true,sidebarOrder:DEFAULT_SIDEBAR_ORDER};let appSettings={...DEFAULT_SETTINGS};try{appSettings={...DEFAULT_SETTINGS,...JSON.parse(localStorage.getItem(SETTINGS_KEY)||'{}')}}catch(_e){}const allowedSetting=(value,allowed,fallback)=>allowed.includes(value)?value:fallback;@@ -5518,7 +5518,7 @@ function followAuthorBlock(group){const name=followAuthorName(group);const legacy=localStorage.getItem('peach.legacy-ui')==='true';const key=String(group[0].author_key||group[0].id);- const collapsed=!legacy&&followListLayout()==='cozy'&&collapsedFollowAuthors.has(key);+ const collapsed=!legacy&&collapsedFollowAuthors.has(key);const bad=group.filter(s=>s.last_status==='error'||s.last_status==='unauthorized').length;const sourceRows=group.map(source=>followSourceRow(source,!legacy)).join('');const sources=localStorage.getItem('peach.legacy-ui')==='true'@@ -5539,30 +5539,76 @@ function followAuthorBlock(group){}const followSourceSelection=new Set();-function followSourceRow(source,selectable=false){+/* 一条来源在两种视图里是同一批格子:勾选、名字、站点、状态、上次检查、动作和错误。+ 默认视图把它们排成作者卡里的一行,表格视图把每格放进一个 <td>;勾选、检查、移除+ 的 data 属性两边一样,接线不分视图。 */+function followSourceCells(source,selectable=false){const state=source.last_status||'未检查';const bad=state==='error'||state==='unauthorized';const badge=!source.enabled?'paused':state==='ok'?'ok':bad?'error':'none';const stateTitle=source.history_exhausted?'没有更多':!source.enabled?'已暂停':state==='ok'?'正常':bad?'检查失败':'未检查';- const statusChip=`<span class="sbadge ${badge}" title="${esc(stateTitle)}"><i aria-hidden="true"></i><span>${esc(stateTitle)}</span></span>`;- return `<div class="frow fsource${bad?' bad':''}${source.enabled?'':' disabled'}">- ${selectable?`<label class="fchannelcheck">${checkboxHtml(`data-follow-select="${source.id}" ${followSourceSelection.has(source.id)?'checked':''} aria-label="选择 ${esc(source.label)}"`)}</label>`:`<label class="fchannelcheck" title="${source.enabled?'参与检查更新':'暂停检查更新'}">${checkboxHtml(+ const status=`<span class="sbadge ${badge}" title="${esc(stateTitle)}"><i aria-hidden="true"></i><span>${esc(stateTitle)}</span></span>`;+ const check=selectable?`<label class="fchannelcheck">${checkboxHtml(`data-follow-select="${source.id}" ${followSourceSelection.has(source.id)?'checked':''} aria-label="选择 ${esc(source.label)}"`)}</label>`:`<label class="fchannelcheck" title="${source.enabled?'参与检查更新':'暂停检查更新'}">${checkboxHtml(`data-follow-enabled="${source.id}" ${source.enabled?'checked':''}`- +` aria-label="${source.enabled?'暂停':'启用'} ${esc(source.label)} 的更新检查"`)}</label>`}- <b><a class="fsourcelink externallink" href="${esc(source.url)}" target="_blank"- rel="noreferrer noopener" title="打开原来源">${esc(source.label)}${icon('external-link','externalmark')}</a></b>- <span class="fmeta fprovider" title="${esc(source.provider_label)}">${sourceIcon(source.provider)- }<span>${esc(source.provider_label)}</span>${selectable?statusChip:''}</span>- <span class="fmeta fchecked">${source.last_checked_at?localTimeHtml(source.last_checked_at):'未检查'}</span>- ${selectable?'':statusChip}- <span class="fsourceactions">+ +` aria-label="${source.enabled?'暂停':'启用'} ${esc(source.label)} 的更新检查"`)}</label>`;+ const name=`<b><a class="fsourcelink externallink" href="${esc(source.url)}" target="_blank"+ rel="noreferrer noopener" title="打开原来源">${esc(source.label)}${icon('external-link','externalmark')}</a></b>`;+ const provider=extra=>`<span class="fmeta fprovider" title="${esc(source.provider_label)}">${sourceIcon(source.provider)+ }<span>${esc(source.provider_label)}</span>${extra}</span>`;+ const checked=`<span class="fmeta fchecked">${source.last_checked_at?localTimeHtml(source.last_checked_at):'未检查'}</span>`;+ const actions=`<span class="fsourceactions"><button class="frowicon" data-follow-check="${source.id}" title="检查更新"${source.enabled?'':'disabled'}aria-label="检查 ${esc(source.label)} 的更新">${icon('refresh-cw')}</button><button class="frowicon danger" data-follow-remove="${source.id}" title="移除来源"aria-label="移除 ${esc(source.label)}">${icon('trash')}</button>- </span>- ${source.last_error?`<p class="frowerr">${esc(source.last_error)}</p>`:''}</div>`;+ </span>`;+ const error=source.last_error?`<p class="frowerr">${esc(source.last_error)}</p>`:'';+ return {className:`fsource${bad?' bad':''}${source.enabled?'':' disabled'}`,check,name,provider,status,checked,actions,error};+}+function followSourceRow(source,selectable=false){+ const cell=followSourceCells(source,selectable);+ return `<div class="frow ${cell.className}">+ ${cell.check}+ ${cell.name}+ ${cell.provider(selectable?cell.status:'')}+ ${cell.checked}+ ${selectable?'':cell.status}+ ${cell.actions}+ ${cell.error}</div>`;+}++/* 表格视图照 boardui.com/components/data-table(取证见 docs/BOARD_UI.md):一行一条来源,+ 作者列每行都写,表头两列能点,点的是工具栏里已有的那两种排序。它有而这里不要的三样:+ 页码——列表本来就是全量;表尾的密度档——视图开关自己就是;表头里的全选——全选连着+ 批量动作留在上面那条选择栏,两个全选框会互相打架。排序方向沿用工具栏那对箭头字形。 */+const FOLLOW_TABLE_SORT={author:'name',checked:'checked'};+function followTableHeader(key,label){+ const sort=FOLLOW_TABLE_SORT[key],active=followManageSort===sort;+ const ascending=active&&followManageDir==='asc';+ return `<th scope="col" aria-sort="${active?(ascending?'ascending':'descending'):'none'}"><button type="button" class="ftsort" data-follow-table-sort="${sort}" aria-label="按${label}排序">${label}${icon(ascending?'arrow-up':'arrow-down')}</button></th>`;+}+function followSourceTable(groups,selectable){+ const rows=groups.map(group=>{+ const name=followAuthorName(group);+ return group.map(source=>{+ const cell=followSourceCells(source,selectable);+ return `<tr class="${cell.className}">+ <td class="ftcheck">${cell.check}</td>+ <td class="ftauthor"><span class="ftauthorcell">${followAuthorAvatar(group)}<span>${esc(name)}</span></span></td>+ <td class="ftname">${cell.name}${cell.error}</td>+ <td class="ftprovider">${cell.provider('')}</td>+ <td class="ftstatus">${cell.status}</td>+ <td class="ftchecked">${cell.checked}</td>+ <td class="ftactions">${cell.actions}</td></tr>`;+ }).join('');+ }).join('');+ return `<div class="ftablewrap"><table class="ftable"><thead><tr>+ <th scope="col"><span class="sr-only">${selectable?'选择':'启用'}</span></th>+ ${followTableHeader('author','作者')}+ <th scope="col">来源</th><th scope="col">站点</th><th scope="col">状态</th>+ ${followTableHeader('checked','上次检查')}+ <th scope="col"><span class="sr-only">操作</span></th></tr></thead><tbody>${rows}</tbody></table></div>`;}function followAliasManager(groups,suggestions){@@ -5644,29 +5690,23 @@ function followCredentialRow(row){</summary>${body}</details>`;}-/* 关注列表以同一来源集合、作者顺序和选择状态提供两种疏密排版。 */-const FOLLOW_LAYOUTS=[['cozy','宽松','layout-grid'],['compact','紧凑','list-filter']];+/* 关注列表的两种视图共用同一份来源集合、作者顺序和勾选:默认视图按作者分卡,+ 表格视图一行一条来源。 */+const FOLLOW_LAYOUTS=[['default','默认视图','layout-grid'],['table','表格视图','table']];function followListLayout(){- return allowedSetting(appSettings.followLayout,FOLLOW_LAYOUTS.map(([k])=>k),'cozy');+ return allowedSetting(appSettings.followLayout,FOLLOW_LAYOUTS.map(([k])=>k),'default');}function followLayoutButtons(){- return iconSwitchHtml('follow-layout','关注列表版式',FOLLOW_LAYOUTS,followListLayout(),+ return iconSwitchHtml('follow-layout','关注列表视图',FOLLOW_LAYOUTS,followListLayout(),{attr:'data-follow-layout'});}function setFollowListLayout(value){appSettings.followLayout=value;saveSettings();- // 疏密只改变排版,保留来源顺序、选择与作者状态。- const root=$('#stats');- root.querySelectorAll('.fsources').forEach(node=>node.dataset.layout=followListLayout());- root.querySelectorAll('[data-follow-author-toggle]').forEach(button=>{- const expanded=value==='compact'||!collapsedFollowAuthors.has(button.dataset.followAuthorToggle);- if((button.getAttribute('aria-expanded')==='true')!==expanded){- const wasCollapsed=collapsedFollowAuthors.has(button.dataset.followAuthorToggle);- button.click();- if(wasCollapsed)collapsedFollowAuthors.add(button.dataset.followAuthorToggle);else collapsedFollowAuthors.delete(button.dataset.followAuthorToggle);- }- });+ // 两种视图的 DOM 不同,切换走排序那条重画路径:拿手里这份 followData 重画,不重取接口、+ // 不换骨架。勾选记在 followSourceSelection 里,收起的作者记在 collapsedFollowAuthors 里,+ // 重画后都还在。+ renderFollowManage(followCredentials||{});}/* 版式判据来自 docs/reference-sources.json 的 vercel-report-design:@@ -5675,7 +5715,11 @@ function setFollowListLayout(value){行与行之间也只用分隔线,不各自套框。控件尺寸按实测 Geist:32px 高、6px 圆角、14px。 */function renderFollowManage(credentials){const sources=followData.sources||[],counts=followData.counts||{};- const groupedSources=followAuthorGroups(sources).map(followAuthorBlock).join('');+ const legacy=localStorage.getItem('peach.legacy-ui')==='true';+ const groups=followAuthorGroups(sources);+ const sourceList=followListLayout()==='table'?followSourceTable(groups,!legacy)+ :legacy?groups.map(followAuthorBlock).join('')+ :`<div class="board-follow-list">${groups.map(followAuthorBlock).join('')}</div>`;const broken=sources.filter(s=>s.last_status==='error'||s.last_status==='unauthorized');const creds=(credentials.providers||[]);const needCred=creds.filter(c=>c.requirement==='required'&&!(c.present&&!c.missing.length));@@ -5714,8 +5758,7 @@ function renderFollowManage(credentials){<button class="fbtn" data-follow-view>${icon('rss')}去看更新</button></div>${followCheckReport?followCheckFailNote(followCheckReport):''}${sources.length&&localStorage.getItem('peach.legacy-ui')!=='true'?`<div class="board-follow-selection"><label>${checkboxHtml('data-follow-select-all aria-label="全选来源"')}全选</label><span data-follow-selected-count>已选 0</span><button class="fbtn" data-follow-check="" data-follow-sources="" data-follow-selection-action disabled>检查所选</button><button class="fbtn" data-follow-selection-enabled="true" data-follow-selection-action disabled>启用</button><button class="fbtn" data-follow-selection-enabled="false" data-follow-selection-action disabled>暂停</button><button class="fbtn danger" data-follow-selection-remove data-follow-selection-action disabled>删除</button></div>`:''}- ${sources.length?`<div class="frows fsources" data-layout="${followListLayout()}">${- localStorage.getItem('peach.legacy-ui')==='true'?groupedSources:`<div class="board-follow-list">${groupedSources}</div>`}</div>+ ${sources.length?`<div class="frows fsources" data-layout="${followListLayout()}">${sourceList}</div>${counts.new?`<div class="fsecfoot"><p class="fnote fbulkrow"><span class="fbulkcounts">未看 ${counts.new} · 已看 ${counts.seen||0}· 已保存 ${counts.saved||0} · 已忽略 ${counts.ignored||0}</span><span class="fbulk"><button class="fbtn" data-follow-bulk="seen">全部标记已看</button>@@ -5880,6 +5923,13 @@ function wireFollowManage(creds=[]){followManageDir=followManageDir==='asc'?'desc':'asc';routeFollowManageSort();};+ // 表格视图的表头:再点当前那列是翻方向,点另一列是换列并回到该列的默认方向。+ root.querySelectorAll('[data-follow-table-sort]').forEach(button=>button.onclick=()=>{+ const sort=button.dataset.followTableSort;+ if(followManageSort===sort)followManageDir=followManageDir==='asc'?'desc':'asc';+ else{followManageSort=sort;followManageDir=FOLLOW_SORT_DEFAULT_DIR[sort]||'desc'}+ routeFollowManageSort();+ });wireIconSwitch(root,'data-follow-layout',setFollowListLayout);renderFollowSrcFilter(root.querySelector('#followSrcFilter'),creds);const tooltipTrigger=root.querySelector('[data-fdesc-tooltip]');diff --git a/web/board.css b/web/board.cssindex 1ac9052e0..ec688f22b 100644--- a/web/board.css+++ b/web/board.css@@ -444,16 +444,16 @@ button,input,select,textarea{font-family:inherit}.tasterank-visual{grid-template-columns:24px 36px minmax(0,1fr) 16px}.tasterank .tasteavatar{width:36px;height:36px}.tasterank b{font-size:14px;line-height:20px;font-weight:500;white-space:normal;overflow-wrap:anywhere}.tasterank small{white-space:normal;line-height:18px}.tasterank .taste-rank-copy{min-width:0}.taste-rank-track{display:block;height:4px;margin-top:8px;background:var(--line-soft);border-radius:var(--pill-radius);overflow:hidden}.taste-rank-track i{display:block;height:100%;background:var(--tungsten);opacity:.55;border-radius:inherit}.tasteleads>header{padding:24px 24px 12px}.tastelede{display:flex;flex-direction:column;gap:12px}.tasteleads .tastelede p{font-size:20px;line-height:30px;color:var(--ink);max-width:64ch}.tasteleads .insightpanelbody{padding:8px 24px 24px;display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:28px}.tasteinsights{display:flex;flex-direction:column;gap:20px;margin:0}.tasteinsight{padding:0;background:none;gap:6px}.tasteinsight>b{font-weight:400;line-height:22px}.tasteleadlist{align-content:start}.tastelead{background:var(--surface);padding:14px}.tastesources .insightpanelbody>div{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.tastesource{border:0;background:var(--surface);padding:16px}-.followmanage .fmain{gap:28px}.followmanage .fmain>.fsec:has(.fsources){background:none}.followmanage .fmain>.fsec:has(.fsources)>.fsechead{padding:0 0 16px}.followmanage .fmain>.fsec>.fsources{padding:0;grid-template-columns:minmax(0,1fr);gap:16px}.followmanage .fmain>.fsec>.fsources[data-layout="compact"]{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}+.followmanage .fmain{gap:28px}.followmanage .fmain>.fsec:has(.fsources){background:none}.followmanage .fmain>.fsec:has(.fsources)>.fsechead{padding:0 0 16px}.followmanage .fmain>.fsec>.fsources{padding:0;grid-template-columns:minmax(0,1fr);gap:16px}.followmanage .fauthor{height:auto;padding:16px 20px;border:0;border-radius:16px;background:var(--ground);display:block}.followmanage .fauthorhead{padding:0 0 12px}.followmanage .fauthorhead b{font-weight:500;white-space:normal}.followmanage .fauthorsources{height:auto;max-height:none;overflow:visible}.followmanage .fauthor .fsource.frow{padding-block:12px;border:0}.followmanage .fauthor .fsource.frow>b{font-weight:400}.followmanage .fauthor .fsource.frow+.fsource.frow{border-top:1px solid var(--line-soft)}.followmanage .fmain>.fsec:has(.fcred){background:none}.followmanage .fmain>.fsec:has(.fcred)>.fsechead{padding:0 0 12px}.followmanage .fmain>.fsec:has(.fcred)>.frows{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:12px;padding:0}.followmanage .fcred{margin:0;padding:16px;border:0;border-radius:12px;background:var(--ground);min-width:0}.followmanage .fcred summary{padding:0;min-height:32px}.followmanage .fcred.none{min-height:64px}.followmanage .fcred p{overflow-wrap:anywhere}.followmanage .fmain>.fsec>.fdesc{background:none;border:0;padding:16px 0}.configfieldset-heading{border:0;padding-bottom:0}.configfieldset{border:0}.configfieldset>.geist-fieldset-footer{border:0}.configfieldset .configfieldset-heading h2{margin:0}#linkCheckResult:not(:empty),#resourceSyncResult:not(:empty){margin-block:16px 28px}.followmanage .fauthor{container-type:inline-size}-.followmanage .fmain>.fsec>.fsources[data-layout="compact"]{display:block}.board-follow-list{display:grid;border-radius:16px;background:var(--ground);padding:8px 16px}.board-follow-list .fsource.frow{display:grid;grid-template-columns:22px minmax(0,1fr) auto auto auto auto;gap:12px;padding:8px;min-height:48px;border:0;border-radius:8px}.board-follow-list .fsource.frow>b{font-size:13px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:400}.board-follow-list .fsource.selected{background:var(--picked);opacity:1}.board-follow-selection{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:0 0 12px;font-size:13px}.board-follow-selection>label{display:flex;gap:8px;align-items:center}.board-follow-selection>span{margin-right:auto;color:var(--muted)}+.board-follow-list{display:grid;border-radius:16px;background:var(--ground);padding:8px 16px}.board-follow-list .fsource.frow{display:grid;grid-template-columns:22px minmax(0,1fr) auto auto auto auto;gap:12px;padding:8px;min-height:48px;border:0;border-radius:8px}.board-follow-list .fsource.frow>b{font-size:13px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:400}.board-follow-list .fsource.selected{background:var(--picked);opacity:1}.board-follow-selection{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:0 0 12px;font-size:13px}.board-follow-selection>label{display:flex;gap:8px;align-items:center}.board-follow-selection>span{margin-right:auto;color:var(--muted)}@media(max-width:760px){.board-follow-list{padding:8px}.board-follow-list .fsource.frow{grid-template-columns:20px minmax(0,1fr) auto;gap:4px 8px}.board-follow-list .fchannelcheck{grid-column:1;grid-row:1}.board-follow-list .fsource.frow>b{grid-column:2;grid-row:1}.board-follow-list .fprovider{grid-column:2;grid-row:2}.board-follow-list .fchecked{grid-column:2;grid-row:3}.board-follow-list .sbadge{grid-column:1;grid-row:2}.board-follow-list .fsourceactions{grid-column:3;grid-row:1/4}}@container(max-width:520px){.followmanage .fauthor .fsource.frow{grid-template-columns:22px minmax(0,1fr) auto;gap:6px 10px}.followmanage .fsource>.fchannelcheck{grid-column:1;grid-row:1}.followmanage .fauthor .fsource.frow>b{grid-column:2;grid-row:1;white-space:normal;overflow-wrap:anywhere}.followmanage .fsource>.fsourceactions{grid-column:3;grid-row:1/3}.followmanage .fsource>.fprovider{grid-column:2;grid-row:2}.followmanage .fsource>.fchecked{grid-column:2;grid-row:3}.followmanage .fsource>.sbadge{grid-column:1;grid-row:2}.followmanage .fsource>.frowerr{grid-column:1/-1}}-@media(max-width:760px){body #manageTitle{width:100%}.board-watch-entry,.board-source-list,.tasteleads .insightpanelbody,.tasteranks,.tasteranks-tags,.tasteranks-visual,.tastesources .insightpanelbody>div{grid-template-columns:minmax(0,1fr)}.board-watch-entry{gap:8px}.tasteleads>header{padding:20px 16px 12px}.tasteleads .insightpanelbody{padding:8px 16px 20px}.followmanage .fmain>.fsec>.fsources[data-layout="compact"],.followmanage .fmain>.fsec:has(.fcred)>.frows{grid-template-columns:minmax(0,1fr)}.followmanage .fauthor{padding:16px}.followmanage .fsechead{gap:8px}.followmanage .fmanagesort{margin-left:0}}+@media(max-width:760px){body #manageTitle{width:100%}.board-watch-entry,.board-source-list,.tasteleads .insightpanelbody,.tasteranks,.tasteranks-tags,.tasteranks-visual,.tastesources .insightpanelbody>div{grid-template-columns:minmax(0,1fr)}.board-watch-entry{gap:8px}.tasteleads>header{padding:20px 16px 12px}.tasteleads .insightpanelbody{padding:8px 16px 20px}.followmanage .fmain>.fsec:has(.fcred)>.frows{grid-template-columns:minmax(0,1fr)}.followmanage .fauthor{padding:16px}.followmanage .fsechead{gap:8px}.followmanage .fmanagesort{margin-left:0}}/* Board 的语义色与复合字阶;图表和业务状态独立于交互强调色。 */:root,:root[data-theme="light"]{--color-text-primary:#0a0a0a;--color-text-secondary:#737373;--color-text-tertiary:#a3a3a3;--color-background-full:#fff;--color-background-primary-default:#fff;--color-background-primary-hover:#f5f5f5;--color-background-secondary-default:#f5f5f5;--color-background-tertiary-default:#e5e5e5;--color-border-button-default:#e5e5e5;--color-border-button-hover:#d4d4d4;--color-separator-border:#e5e5e5;--color-border-focus-ring:#3b82f6;--color-text-white:#fff;--color-text-disabled:#d4d4d4;--board-blue:linear-gradient(180deg,#3b82f6,#155dfc);--board-blue-hover:linear-gradient(180deg,#60a5fa,#2563eb)}@@ -496,9 +496,14 @@ body button.danger:not(.frowicon):hover:not(:disabled){background:linear-gradien.followmanage .board-follow-list .fauthor{width:100%;height:auto;margin:0;padding:16px;border-radius:var(--surface-radius)}.followmanage .board-follow-list .fauthorhead{min-height:36px}.followmanage .board-author-toggle{margin-left:auto;flex:none}.board-author-toggle[aria-expanded=true] svg{transform:rotate(180deg)}.followmanage .fauthorsources[hidden]{display:none}.followmanage .board-follow-list .fsource.frow{min-height:64px;padding:12px 8px}-.followmanage .fsources[data-layout="compact"] .board-follow-list{gap:0}.followmanage .fsources[data-layout="compact"] .fauthor{padding:8px 16px;border-radius:0}.followmanage .fsources[data-layout="compact"] .fauthorhead{min-height:32px;margin-bottom:4px}.followmanage .fsources[data-layout="compact"] .fsource.frow{min-height:48px;padding:8px}.followmanage .fsources[data-layout="compact"] .board-author-toggle{display:none}-@media(min-width:1200px){.followmanage .fsources[data-layout="cozy"] .board-follow-list{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}}-@media(max-width:760px){.followmanage .fsechead .iconswitch{display:flex}.followmanage .board-follow-list .fauthor{padding:12px}.followmanage .fsources[data-layout="compact"] .fauthor{padding:8px}}+/* 表格视图在 Board 层套的是 Board 自己的 token:表头次级底、三级字、分隔线色都取自+ boardui 同名变量。外框用 primary 底而不是作者卡那块 --ground:Board 层把 --ground 定成了+ secondary,和表头同色,表头那条带子就没了;boardui 的表格本来就摆在 primary 面上。 */+.followmanage .ftablewrap{border-radius:var(--surface-radius);background:var(--color-background-primary-default)}+.followmanage .ftable th{color:var(--color-text-tertiary);background:var(--color-background-secondary-default);border-color:var(--color-separator-border)}+.followmanage .ftable tbody tr{border-color:var(--color-separator-border)}+@media(min-width:1200px){.followmanage .fsources[data-layout="default"] .board-follow-list{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}}+@media(max-width:760px){.followmanage .fsechead .iconswitch{display:flex}.followmanage .board-follow-list .fauthor{padding:12px}}/* 导航图形使用同宽槽位;logo 的透明边距按实际可见轮廓适配。 */.board-home-logo{width:20px;height:20px}.drawer:not(.open) .dnav button:has(.board-home-logo){padding:8px}@@ -536,7 +541,6 @@ body a:is(.externallink,[target=_blank]):not(:has(img)):hover{background:transpabody :is(.sbadge,.faliasbadge,.tasteconfidence,.board-chip,.badge){display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:4px 6px;min-height:24px;box-sizing:border-box;border:0;border-radius:6px;background:var(--color-background-tertiary-default);color:var(--color-text-secondary);font:var(--board-caption);white-space:nowrap}body :is(.sbadge.ok,.board-chip.success){background:color-mix(in srgb,#84cc16 16%,var(--color-background-primary-default));color:#4d7c0f}body :is(.sbadge.error,.board-chip.error){background:color-mix(in srgb,#f43f5e 12%,var(--color-background-primary-default));color:#e11d48}.sbadge i,.tasteconfidence i{display:none}.fprovider{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.fprovider .sbadge{flex:none}.followmanage .fsource.frow{grid-template-columns:20px minmax(120px,1fr) minmax(100px,auto) auto auto}.followmanage .fchannelcheck{align-self:start;margin-top:2px}-.followmanage .fsources[data-layout="compact"] .fsource .fprovider:has(.ficon)>.sbadge{display:inline-flex}.board-sankey-card :is([data-flow-node],[data-flow-source]){outline:none}.board-sankey-card :is([data-flow-node],[data-flow-source]):focus-visible{outline:2px solid var(--color-border-focus-ring);outline-offset:3px}.board-button-group{display:inline-flex;align-items:center;overflow:hidden;border:1px solid var(--color-border-button-default);border-radius:10px;background:var(--color-background-primary-default);box-shadow:0 1px 2px #0000000d}.board-button-group>button{height:34px;padding:0 12px;border:0;border-radius:0;box-shadow:none;background:transparent;color:var(--color-text-secondary);font:var(--board-body)}.board-button-group>button+button{border-left:1px solid var(--color-border-button-default)}.board-button-group>button:is(:hover,[aria-pressed=true]){background:var(--color-background-primary-hover);color:var(--color-text-primary)}.followmanage .fpickactions .fbtn{height:36px;min-height:36px;padding:8px 12px}diff --git a/web/css/22-followmanage.css b/web/css/22-followmanage.cssindex fc81c3ac9..6e35d193a 100644--- a/web/css/22-followmanage.css+++ b/web/css/22-followmanage.css@@ -157,14 +157,36 @@.frows{display:grid;min-width:0}.frows>*{min-width:0}.fsources{grid-template-columns:repeat(auto-fit,minmax(430px,1fr));gap:16px 22px;align-items:start}-/* 紧凑版式:一行两个。半幅宽度放不下来源行的六列,来源收成一枚 favicon,时间去掉- 年份——看的是最近有没有检查过,年份是其中最不影响判断的一段。取不到图标的站保留- 站名,否则那一格就空了;`:has` 会跟着图片加载失败后被摘掉的 `<img>` 一起重算。 */-.fsources[data-layout="compact"]{grid-template-columns:repeat(2,minmax(0,1fr))}-.fsources[data-layout="compact"] .fsource .fprovider:has(.ficon)>span{display:none}-.fsources[data-layout="compact"] .fsource .fprovider:has(.ficon) .ficon{margin-right:0}-.fsources[data-layout="compact"] .fsource .fchecked .fyear{display:none}.fsource .fchecked .fyear{font-style:normal}+/* 表格视图。数值取自 boardui.com/components/data-table 的 `.bui-table`(2026-09-08,+ 登记见 docs/BOARD_UI.md):表头与格子都是 10px 12px 内边距、14/20、竖直居中;表头+ 500 字重、次要字色、次级底色、上下各一条分隔线;正文行只有一条下边线,悬停不换底。+ 窄屏不折叠列——它的做法是容器横向滚动,这里照做。 */+.fsources[data-layout="table"]{display:block}+.ftablewrap{overflow-x:auto;overscroll-behavior-x:contain}+.ftable{width:100%;min-width:760px;border-collapse:collapse;text-align:left;font-size:var(--fs-md);line-height:20px}+.ftable th,.ftable td{padding:10px 12px;vertical-align:middle}+.ftable th{font-weight:500;white-space:nowrap;color:var(--muted);background:var(--sunk);+ border-top:1px solid var(--line-soft);border-bottom:1px solid var(--line-soft)}+.ftable tbody tr{border-bottom:1px solid var(--line-soft)}+.ftable tbody tr:last-child{border-bottom:0}+.ftable .ftcheck{width:20px;padding-right:0}+.ftable .ftauthorcell{display:flex;align-items:center;gap:8px;white-space:nowrap}+.ftable .ftauthorcell .favatar{width:24px;height:24px;font-size:var(--fs-xs)}+.ftable .ftname{max-width:360px}+.ftable .ftname>b{display:block;min-width:0;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}+.ftable .ftname>.frowerr{margin:4px 0 0}+.ftable .fmeta{white-space:nowrap}+.ftable .ftactions{width:72px;padding-left:0}+.ftable .ftactions .fsourceactions{justify-content:flex-end}+/* 能排序的表头是一颗文字键:文字与箭头同色,非当前列的箭头淡下去只说「这列能点」。 */+.ftsort{display:inline-flex;align-items:center;gap:4px;padding:0;border:0;background:none;+ font:inherit;color:inherit;cursor:pointer}+.ftsort svg{width:14px;height:14px;stroke:currentColor;fill:none;opacity:.45}+.ftsort:hover{color:var(--ink)}+th[aria-sort="ascending"] .ftsort,th[aria-sort="descending"] .ftsort{color:var(--ink)}+th[aria-sort="ascending"] .ftsort svg,th[aria-sort="descending"] .ftsort svg{opacity:1}+.ftsort:focus-visible{outline:2px solid var(--tungsten);outline-offset:2px}.frow{display:flex;align-items:center;gap:12px;padding:9px 0;flex-wrap:wrap;border-bottom:1px solid var(--border-10)}.frows>.frow:last-child{border-bottom:0}@@ -204,8 +226,6 @@.fauthorsources .fsource:last-child{border-bottom:0}.fauthor .fsource.frow{padding-left:0px;display:grid;grid-template-columns:22px minmax(0,1fr) auto auto auto auto;gap:10px;flex-wrap:nowrap}-/* 时间那列回来后名字只剩 118px,35 条里 11 条被截;列间距收到 8px 换回 10px 给名字。 */-.fsources[data-layout="compact"] .fsource.frow{gap:8px}.fauthor .fsource.frow>b{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fsource.disabled{opacity:.62}.fchannelcheck{display:grid;place-items:center;align-self:center}@@ -318,16 +338,10 @@ details.fcred{display:block;min-width:0}.faddform>.geist-search{grid-column:1/-1}.faddform>.fsrcfilter{justify-self:start}.frow{gap:8px}- .fsources,.fsources[data-layout="compact"]{grid-template-columns:1fr}- /* 窄屏放不下两栏,紧凑版式在这里不成立;开关跟着收起,不留一个按了没反应的控件。- 属性也可能还留着上次在宽屏选的 compact,那几条压缩规则一并撤销:这里是整幅一栏,- 没有理由把站名收成图标。 */- .fsechead .iconswitch{display:none}+ .fsources{grid-template-columns:1fr}/* 省略后剩给说明文字的不到 120px,读出来只是「N 个来源 · 」这种半句;未看条数在下面每一行来源上都有,标题行让给排序和两个动作键。 */.fsechead .fmeta{display:none}- .fsources[data-layout="compact"] .fsource .fprovider:has(.ficon)>span{display:inline}- .fsources[data-layout="compact"] .fsource .fprovider:has(.ficon) .ficon{margin-right:5px}.frow .fmeta:nth-of-type(2){display:none}.faliasform{grid-template-columns:1fr}.faliasform .fbtn{width:100%}diff --git a/web/index.html b/web/index.htmlindex 49d12c664..be63a52fe 100644--- a/web/index.html+++ b/web/index.html@@ -156,6 +156,7 @@<symbol id="i-file-archive" viewBox="0 0 24 24"><path d="M13.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v11.5" /><path d="M14 2v5a1 1 0 0 0 1 1h5" /><path d="M8 12v-1" /><path d="M8 18v-2" /><path d="M8 7V6" /><circle cx="8" cy="20" r="2" /></symbol><symbol id="i-file-audio" viewBox="0 0 24 24"><path d="M4 6.835V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-.343" /><path d="M14 2v5a1 1 0 0 0 1 1h5" /><path d="M2 19a2 2 0 0 1 4 0v1a2 2 0 0 1-4 0v-4a6 6 0 0 1 12 0v4a2 2 0 0 1-4 0v-1a2 2 0 0 1 4 0" /></symbol><symbol id="i-file-stack" viewBox="0 0 24 24"><path d="M11 21a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1v-8a1 1 0 0 1 1-1" /><path d="M16 16a1 1 0 0 1-1 1H9a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1" /><path d="M21 6a2 2 0 0 0-.586-1.414l-2-2A2 2 0 0 0 17 2h-3a1 1 0 0 0-1 1v8a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1z" /></symbol>+ <symbol id="i-table" viewBox="0 0 24 24"><path d="M12 3v18" /><rect width="18" height="18" x="3" y="3" rx="2" /><path d="M3 9h18" /><path d="M3 15h18" /></symbol><symbol id="i-sperm" viewBox="1.5 1.2 21.2 21.2"><path d="M18.2574 3.04039C16.6079 3.3153 15.3153 4.60785 15.0404 6.25731C14.9261 6.94343 15.1179 7.59015 15.5007 8.08229L15.1947 8.49031C14.8361 8.96852 14.2732 9.24995 13.6754 9.24995H12.8524C10.9372 9.24995 9.58486 11.1262 10.1905 12.9431L10.3037 13.2827C10.5666 14.0715 9.88821 14.8537 9.07014 14.705C7.36157 14.3943 5.83623 15.8176 6.02801 17.5435L6.05171 17.7569C6.12353 18.4033 5.68919 18.9973 5.05144 19.1248L4.35291 19.2645C3.94674 19.3458 3.68333 19.7409 3.76456 20.147C3.8458 20.5532 4.24092 20.8166 4.64709 20.7354L5.34562 20.5957C6.74631 20.3155 7.70028 19.0109 7.54253 17.5912L7.51883 17.3779C7.43795 16.65 8.08124 16.0497 8.80181 16.1808C10.7416 16.5334 12.3502 14.6787 11.7267 12.8083L11.6135 12.4688C11.3317 11.6232 11.9611 10.75 12.8524 10.75H13.6754C14.7453 10.75 15.7528 10.2462 16.3947 9.39031L16.7517 8.9143C17.0623 8.99708 17.3975 9.01704 17.7426 8.95951C19.3921 8.6846 20.6847 7.39205 20.9596 5.7426C21.2244 4.15334 19.8466 2.77552 18.2574 3.04039Z" fill="currentColor"/><path d="M11.0548 3.32416C10.1507 3.47484 9.41308 4.15197 9.17192 5.03625C9.06125 5.44203 9.13468 5.83765 9.32677 6.15771L8.8594 6.85877C8.69647 7.10316 8.42219 7.24995 8.12847 7.24995H7.75C6.64543 7.24995 5.75 8.14538 5.75 9.24995C5.75 9.52609 5.52614 9.74995 5.25 9.74995C4.14543 9.74995 3.25 10.6454 3.25 11.75V12C3.25 12.4142 3.58579 12.75 4 12.75C4.41421 12.75 4.75 12.4142 4.75 12V11.75C4.75 11.4738 4.97386 11.25 5.25 11.25C6.35457 11.25 7.25 10.3545 7.25 9.24995C7.25 8.97381 7.47386 8.74995 7.75 8.74995H8.12847C8.92372 8.74995 9.66635 8.35251 10.1075 7.69082L10.6492 6.87823C10.7526 6.87326 10.8578 6.85692 10.9637 6.82804C11.848 6.58687 12.5251 5.84929 12.6758 4.94518C12.8347 3.9918 12.0081 3.16526 11.0548 3.32416Z" fill="currentColor"/><path d="M18.1471 11.3088C17.2045 11.4659 16.4659 12.2045 16.3088 13.147C16.2724 13.3658 16.2904 13.5775 16.3514 13.7709L15.0321 15.31C14.7928 15.5892 14.4434 15.75 14.0756 15.75C13.1529 15.75 12.2912 16.2111 11.7793 16.9789L11.7373 17.0419C11.4196 17.5185 11.25 18.0785 11.25 18.6513V19C11.25 19.4142 11.5858 19.75 12 19.75C12.4142 19.75 12.75 19.4142 12.75 19V18.6513C12.75 18.3747 12.8319 18.1042 12.9854 17.874L13.0274 17.8109C13.261 17.4605 13.6544 17.25 14.0756 17.25C14.8813 17.25 15.6467 16.8979 16.171 16.2862L17.5255 14.706C17.6318 14.7141 17.7415 14.7097 17.8529 14.6911C18.7955 14.534 19.5341 13.7954 19.6912 12.8529C19.8425 11.9447 19.0552 11.1574 18.1471 11.3088Z" fill="currentColor"/></symbol></svg>diff --git a/web/vendor/lucide-ORIGIN.md b/web/vendor/lucide-ORIGIN.mdindex 3205bd9f8..22952ecc8 100644--- a/web/vendor/lucide-ORIGIN.md+++ b/web/vendor/lucide-ORIGIN.md@@ -3,7 +3,7 @@- npm 包:`[email protected]`- npm lock integrity:`sha512-ln37Ng6A709exLQH4pBxrbl6FAUk/ZBLTJnLrj02HN/Bb84eUGzlA2JjMglScI0TEab6vH2UVs0hm4vGgLzTrQ==`- 许可证:ISC;原文见 `lucide-LICENSE.txt`-- 消费者:`web/index.html` 内联的 91 个 symbol+- 消费者:`web/index.html` 内联的 92 个 symbol雪碧图里另有 7 枚自绘 symbol(shuffle、alert、pics、jav、theater-enter、theater-exit、brand-x)与 16 枚 player-* 前缀的播放器图标,都没有上游可对。RSS 与拖动点保留填充修正,避免小圆点在全局描边样式下消失。