Peach: Local-first video metadata scraper and media manager.
fix(ui): 关注列表进框、勾选框画勾、表格框线与可排序列,图标选择器扩到 42 枚
longmeidao8c1a929b874b
diff --git a/docs/BOARD_UI.md b/docs/BOARD_UI.mdindex b4a7289e1..a500338cc 100644--- a/docs/BOARD_UI.md+++ b/docs/BOARD_UI.md@@ -104,7 +104,23 @@ Radial Chart Card、Bar List Card、Heatmap 与 Sankey 的 Pro 源码**未取得| 可排序表头带 `ChevronSortDown` 字形 | 表头两列接入工具栏已有的两种排序;方向字形沿用工具栏的 `arrow-up`/`arrow-down` || 表格 `min-w-[1000px]`,外层 `overflow-x-auto` | `min-width:760px`,外层横向滚动,窄屏不折叠列 |-选中行的样式上游页面没有暴露出来(复选框选中后 `tr` 无 `data-selected`),Peach 沿用 Board 层已有的 `.fsource.selected`。+选中行的样式上游页面没有暴露出来(复选框选中后 `tr` 无 `data-selected`):Peach 给选中行铺一层蓝色 8% 的底,不描蓝线。表格外面多一层 `.ftableframe` 管边线与圆角,`.ftablewrap` 只管横向滚动:两端按滚动位置渐隐说明「那边还有」,鼠标停在表格上时竖向滚轮转成横向,与复核页标签条同一份接线;边线留在外层,才不会跟内容一起淡掉。表头五列都能点,维度与工具栏下拉是同一份并集:作者、上次检查按作者分组比,来源、站点、状态按单条来源比。++### 关注列表的框、来源行与勾选框(2026-09-08)++取证来源是公开注册表 `r/checkbox.json` 与 `r/checkbox-card.json`(`checkbox-glyph.tsx`、`checkbox-card.tsx`),以及站点样式表 `0n0ugaibgw__p.css`(SHA-256 `a856db5e9e1a58b2e32b7bfa6d7f1cab69dd09e4bd7ac22fc455dd10b525cf27`)里的 `check-draw`、`--shadow-checkbox-selected`、`--shadow-xs` 与 token 定义。++| 上游 | Peach |+| --- | --- |+| CheckboxCard:10px 圆角、1px `border-button-default`、pl 16 / pr 20 / py 12,悬停 `background-primary-hover` 150ms,整卡可点 | 关注列表的每条来源行;勾选框在左(Peach 的行右边是检查、移除两枚动作键);选中行沿用焦点环色的边,上游只亮勾选框 |+| Checkbox 16px、4px 圆角;未选 `border-checkbox-default`(亮 neutral-300、暗 neutral-700)+ `shadow-xs`;悬停边线到 neutral-400/500,底不变 | `.pcheck` 同值;旧版层的悬停换底被 Board 层压掉 |+| 选中 blue-500→600 渐变 + `inset 0 2px 0 0 #ffffff40, inset 0 0 0 1px accent-500`;悬停渐变提到 400→500 | 同值,渐变取 `--board-blue` |+| 勾 2px 圆头,`pathLength=1`,`check-draw` 200ms cubic-bezier(.65,0,.35,1) 从零画出;减少动态效果时直接显示 | 勾是雪碧图的 `check`,无法写 pathLength,按路径实长 23 写 dasharray;其余同值 |+| 页面上卡片摆在 primary 面上 | 关注列表整段是一只 `--ground` 卡(与「添加关注」同一只),作者卡是 primary 面,来源行才是 CheckboxCard;这样悬停的 primary-hover 才不与底同色 |+| Segmented Control 暗色:轨道 neutral-925、滑块 neutral-800 | Peach 暗色页面本身更深,轨道留 tertiary(#262626),滑块提主文字色 14%;上一节写的「未取得」以此为准 |+| Avatar `avatar-neutral-background`:亮 neutral-300、暗 `background-primary-default` | 首页两排与身份头像继续用主文字色 10% 混底:暗色里上游值与卡片底同色,正是用户回执的问题 |++媒体库图标选择器同批:格子与触发钮同一枚 20px、2 描边的字形,装在同一个 20px 盒子里居中;候选 42 枚一行七枚,题材、身份、场景、媒介各一组;网盘库不另选时显示来源站标(服务端 `media_libraries.libraries` 本就把单一来源的库落到该来源),本地路径没有可识别的来源,写作「默认」并显示磁盘。### 下拉菜单的开合动效(2026-09-08)diff --git a/frontend/src/islands/configuration.tsx b/frontend/src/islands/configuration.tsxindex 0dd0971d3..64f31430d 100644--- a/frontend/src/islands/configuration.tsx+++ b/frontend/src/islands/configuration.tsx@@ -301,7 +301,7 @@ function ConfigurationForm({ data, receipt }: { data: ConfigurationData; receiptonInput={(event) => { const next = [...libraries]; next[index] = event.currentTarget.value; setLibraries(next); }} /></label><div class="configsourcelabel">媒体库图标- <LibraryIconPicker label={`媒体库图标 ${index + 1}`} value={libraryIcons[index] || ''}+ <LibraryIconPicker label={`媒体库图标 ${index + 1}`} value={libraryIcons[index] || ''} kind={kinds[index] || 'local'}onChange={(value) => { const next = [...libraryIcons]; next[index] = value; setLibraryIcons(next); }} /></div><div class="configsourcelabel">媒体来源diff --git a/frontend/src/library-icon-picker.tsx b/frontend/src/library-icon-picker.tsxindex 2b34a8dfb..e83d2af77 100644--- a/frontend/src/library-icon-picker.tsx+++ b/frontend/src/library-icon-picker.tsx@@ -1,27 +1,39 @@import { useRef, useState } from 'preact/hooks';-import { selectOptionIconHtml } from '@peach/legacy/ui';+import { selectOptionIconHtml, MEDIA_SOURCE_ICONS } from '@peach/legacy/ui';+/* 一行七枚、六行排完。第一枚是「不另选」:网盘库自动用网盘标识,本地路径没有可识别的+ 来源,就是默认那枚磁盘。其余按题材成组:身体与情欲、身份与装扮、场景与情境、媒介与归档。 */export const LIBRARY_ICON_CHOICES = [- ['', '自动识别'], ['hard-drive','磁盘'], ['database','资料库'], ['heart','心动'], ['heart-hand','亲密'],- ['flame','热情'], ['cherry','樱桃'], ['gem','精选'], ['crown','女王'], ['shirt','制服'],- ['footprints','足迹'], ['flower','花朵'], ['venetian-mask','角色扮演'], ['hand','手部'], ['bed-double','卧室'],- ['moon','夜色'], ['sparkles','幻想'], ['camera','写真'], ['video','影片'], ['star','收藏'], ['tags','主题'],+ ['', '自动识别'], ['hard-drive','磁盘'], ['database','资料库'], ['heart','心动'], ['heart-hand','亲密'], ['flame','热情'], ['cherry','樱桃'],+ ['lollipop','甜心'], ['candy','糖果'], ['banana','香蕉'], ['droplets','湿润'], ['venus','女性'], ['mars','男性'], ['venus-and-mars','情侣'],+ ['gem','精选'], ['crown','女王'], ['ribbon','丝带'], ['shirt','制服'], ['graduation-cap','学生'], ['stethoscope','护士'], ['glasses','眼镜'],+ ['footprints','足迹'], ['hand','手部'], ['flower','花朵'], ['venetian-mask','角色扮演'], ['rabbit','兔女郎'], ['paw-print','兽耳'], ['dumbbell','健身'],+ ['bed-double','卧室'], ['bath','浴室'], ['key-round','私密'], ['wine','微醺'], ['cigarette','烟'], ['moon','夜色'], ['sparkles','幻想'],+ ['camera','写真'], ['video','影片'], ['film','电影'], ['image','图集'], ['gamepad-2','游戏'], ['star','收藏'], ['tags','主题'],] as const;-export function LibraryIconPicker({value,label,onChange}:{value:string;label:string;onChange(value:string):void}) {+/** 不另选时的字形与说法:网盘库跟着来源走(115、PikPak 的站标),本地路径没有什么可识别,就是默认磁盘。 */+export function libraryAutoChoice(kind:string):[string,string] {+ const mark=kind!=='local'?MEDIA_SOURCE_ICONS[kind]:'';+ return mark?[mark,'自动识别']:['hard-drive','默认'];+}++export function LibraryIconPicker({value,label,kind='local',onChange}:{value:string;label:string;kind?:string;onChange(value:string):void}) {const [draft,setDraft]=useState(value);const popup=useRef<HTMLDialogElement>(null),trigger=useRef<HTMLButtonElement>(null);- const glyph=(name:string)=><span aria-hidden="true" dangerouslySetInnerHTML={{__html:selectOptionIconHtml(name||'database')}}/>;+ const [autoMark,autoLabel]=libraryAutoChoice(kind);+ const glyph=(name:string)=><span aria-hidden="true" dangerouslySetInnerHTML={{__html:selectOptionIconHtml(name||autoMark)}}/>;+ const choiceLabel=(key:string,name:string)=>key?name:autoLabel;const open=()=>{setDraft(value);const dialog=popup.current!,rect=trigger.current!.getBoundingClientRect();dialog.showModal();const box=dialog.getBoundingClientRect();dialog.style.left=`${Math.max(8,Math.min(innerWidth-box.width-8,rect.left))}px`;dialog.style.top=`${rect.bottom+box.height+8<=innerHeight?rect.bottom+4:Math.max(8,rect.top-box.height-4)}px`;};return <div class="board-icon-picker">- <button ref={trigger} type="button" class="geist-button board-icon-trigger" aria-label={label} aria-haspopup="dialog" onClick={open}>{glyph(value)}<span>{LIBRARY_ICON_CHOICES.find(([key])=>key===value)?.[1]||'自动识别'}</span></button>+ <button ref={trigger} type="button" class="geist-button board-icon-trigger" aria-label={label} aria-haspopup="dialog" onClick={open}>{glyph(value)}<span>{choiceLabel(value,LIBRARY_ICON_CHOICES.find(([key])=>key===value)?.[1]||autoLabel)}</span></button><dialog ref={popup} class="board-icon-popover" aria-label={`${label}候选`} onCancel={()=>setDraft(value)} onClick={event=>{if(event.target===popup.current){popup.current?.close();setDraft(value)}}}>- {/* 格子里只放图标:名字走 title 与 aria-label。21 个候选带着字要排六行,面板比触发它的设置卡还高。 */}+ {/* 格子里只放图标:名字走 title 与 aria-label,带着字的话 42 个候选要排十几行。 */}<div class="board-icon-panel"><h3>选择媒体库图标</h3><div role="radiogroup" aria-label="候选图标" class="board-icon-grid">- {LIBRARY_ICON_CHOICES.map(([key,name])=><label title={name} class={draft===key?'selected':''}><input type="radio" name={`${label}-icon`} aria-label={name} value={key} checked={draft===key} onChange={()=>setDraft(key)}/>{glyph(key)}</label>)}+ {LIBRARY_ICON_CHOICES.map(([key,name])=><label title={choiceLabel(key,name)} class={draft===key?'selected':''}><input type="radio" name={`${label}-icon`} aria-label={choiceLabel(key,name)} value={key} checked={draft===key} onChange={()=>setDraft(key)}/>{glyph(key)}</label>)}</div></div><footer><button type="button" class="geist-button" onClick={()=>{setDraft(value);popup.current!.close()}}>取消</button><button type="button" class="geist-button primary" disabled={draft===value} onClick={()=>{onChange(draft);popup.current!.close()}}>应用</button></footer></dialog>diff --git a/frontend/test/library-icon-picker.test.tsx b/frontend/test/library-icon-picker.test.tsxindex db369757f..2e1f35488 100644--- a/frontend/test/library-icon-picker.test.tsx+++ b/frontend/test/library-icon-picker.test.tsx@@ -1,9 +1,25 @@import { afterEach, expect, it, vi } from 'vitest';import { h, render } from 'preact';import { act } from 'preact/test-utils';-import { LibraryIconPicker, LIBRARY_ICON_CHOICES } from '../src/library-icon-picker';+import { LibraryIconPicker, LIBRARY_ICON_CHOICES, libraryAutoChoice } from '../src/library-icon-picker';let root:HTMLDivElement;afterEach(()=>{render(null,root);document.body.innerHTML=''});+it('一行七枚排满六行,不另选时网盘库显示站标、本地路径就是默认磁盘',async()=>{+ expect(LIBRARY_ICON_CHOICES).toHaveLength(42);+ expect(new Set(LIBRARY_ICON_CHOICES.map(([key])=>key)).size).toBe(42);+ expect(libraryAutoChoice('local')).toEqual(['hard-drive','默认']);+ expect(libraryAutoChoice('115')[1]).toBe('自动识别');+ expect(libraryAutoChoice('115')[0]).toBe('fixture-115');+ root=document.createElement('div');document.body.append(root);+ await act(async()=>render(h(LibraryIconPicker,{label:'媒体库图标',value:'',kind:'local',onChange:()=>{}}),root));+ expect(root.querySelector('.board-icon-trigger span:last-child')!.textContent).toBe('默认');+ expect(root.querySelector('.board-icon-trigger [data-source-icon]')!.getAttribute('data-source-icon')).toBe('hard-drive');+ await act(async()=>render(h(LibraryIconPicker,{label:'媒体库图标',value:'',kind:'115',onChange:()=>{}}),root));+ expect(root.querySelector('.board-icon-trigger span:last-child')!.textContent).toBe('自动识别');+ expect(root.querySelector('.board-icon-trigger [data-source-icon]')!.getAttribute('data-source-icon')).toBe('fixture-115');+ await act(async()=>root.querySelector<HTMLButtonElement>('.board-icon-trigger')!.click());+ expect(root.querySelector('.board-icon-grid label[title=自动识别] [data-source-icon]')!.getAttribute('data-source-icon')).toBe('fixture-115');+});it('候选图标不包含网盘,取消保持原值,应用才提交草稿',async()=>{expect(LIBRARY_ICON_CHOICES.some(([value])=>['115','pikpak'].includes(value))).toBe(false);root=document.createElement('div');document.body.append(root);const change=vi.fn();diff --git a/scripts/vendor_web_dependencies.mjs b/scripts/vendor_web_dependencies.mjsindex 7b9d67260..7ceb7b9e9 100644--- a/scripts/vendor_web_dependencies.mjs+++ b/scripts/vendor_web_dependencies.mjs@@ -72,6 +72,13 @@ const lucideIcons = new Map([["heart-hand","hand-heart"], ["flame","flame"], ["cherry","cherry"], ["gem","gem"],["crown","crown"], ["shirt","shirt"], ["footprints","footprints"], ["flower","flower"],["venetian-mask","venetian-mask"], ["hand","hand"], ["bed-double","bed-double"],+ // 媒体库图标的候选,只归设置页的图标选择器:题材、身份、场景与媒介各一组。+ ["lollipop","lollipop"], ["candy","candy"], ["banana","banana"], ["droplets","droplets"],+ ["venus","venus"], ["mars","mars"], ["venus-and-mars","venus-and-mars"], ["ribbon","ribbon"],+ ["graduation-cap","graduation-cap"], ["stethoscope","stethoscope"], ["glasses","glasses"],+ ["rabbit","rabbit"], ["paw-print","paw-print"], ["dumbbell","dumbbell"], ["bath","bath"],+ ["key-round","key-round"], ["wine","wine"], ["cigarette","cigarette"], ["film","film"],+ ["image","image"], ["gamepad-2","gamepad-2"],["camera","camera"], ["video","video"], ["scan-search","scan-search"],["clapperboard", "clapperboard"], ["briefcase", "briefcase"],["home", "home"], ["panel-left", "panel-left"], ["search", "search"],diff --git a/src/peach/media_libraries.py b/src/peach/media_libraries.pyindex f1d0b51ae..3876352b9 100644--- a/src/peach/media_libraries.py+++ b/src/peach/media_libraries.py@@ -3,7 +3,10 @@ from pathlib import PureWindowsPathLIBRARY_ICONS = frozenset({"hard-drive", "database", "heart", "star", "tags", "115", "pikpak","heart-hand", "flame", "cherry", "gem", "crown", "shirt", "footprints",- "flower", "venetian-mask", "hand", "bed-double", "moon", "sparkles", "camera", "video"})+ "flower", "venetian-mask", "hand", "bed-double", "moon", "sparkles", "camera", "video",+ "lollipop", "candy", "banana", "droplets", "venus", "mars", "venus-and-mars",+ "ribbon", "graduation-cap", "stethoscope", "glasses", "rabbit", "paw-print", "dumbbell",+ "bath", "key-round", "wine", "cigarette", "film", "image", "gamepad-2"})def libraries(config):diff --git a/tests/test_follow_web.py b/tests/test_follow_web.pyindex 41fa3cd4c..f74e20a19 100644--- a/tests/test_follow_web.py+++ b/tests/test_follow_web.py@@ -2152,8 +2152,14 @@ class FollowWebSourceTests(unittest.TestCase):self.assertPageContains("wireIconSwitch(root,'data-follow-layout',setFollowListLayout)")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/* 版式判据来自")+ "return followListLayout()==='table'?followSourceTable(groups,!legacy)")+ # 切换只换列表本身:页头那枚开关留在原地,滑块才有得滑。+ self.assertPageContains("const list=document.querySelector('#stats .fsources');\n"+ " if(!list){renderFollowManage(followCredentials||{});return}\n"+ " list.dataset.layout=value;\n"+ " list.innerHTML=followSourceListHtml(followAuthorGroups(followData.sources||[]));\n"+ " wireFollowManage(followCredentials?.providers||[]);")+ self.assertPageContains("const sourceList=followSourceListHtml(groups);")self.assertPageContains("const collapsed=!legacy&&collapsedFollowAuthors.has(key);")self.assertPageContains("group.map(source=>followSourceRow(source,!legacy))")self.assertPageContains("data-follow-selection-remove")@@ -2204,10 +2210,10 @@ class FollowWebSourceTests(unittest.TestCase):的注释里:页码、表尾密度档、表头全选。窄屏照它的做法横向滚动,不折叠列。"""self.assertPageContains(- '<div class="ftablewrap"><table class="ftable"><thead><tr>')+ '<div class="ftableframe"><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("${followTableHeader('source','来源')}${followTableHeader('provider','站点')}${followTableHeader('status','状态')}")+ self.assertPageContains('<th scope="col"><span class="sr-only">操作</span></th></tr></thead><tbody>${rows}</tbody></table></div></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}")@@ -2218,20 +2224,40 @@ class FollowWebSourceTests(unittest.TestCase):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)}")+ ".followmanage .ftableframe{border:1px solid var(--color-separator-border);border-radius:var(--surface-radius);"+ "background:var(--color-background-primary-default);overflow:hidden}"+ ".followmanage .ftablewrap{border-radius:0;background:transparent}.followmanage .ftable th{border-top:0}")+ self.assertBoardContains(+ ".followmanage .fmain>.fsec:has(>.fsecfoot) .ftableframe{border-bottom:0;border-bottom-left-radius:0;border-bottom-right-radius:0}")+ self.assertBoardContains(+ ".followmanage .ftable tr.fsource.selected,.followmanage .ftable tr.fsource.selected:hover"+ "{background:color-mix(in srgb,var(--tungsten) 8%,var(--color-background-primary-default));border-color:var(--color-separator-border);box-shadow:none}")+ # 表格滚动层与复核页标签条同一份接线:两端渐隐、鼠标停在上面时竖向滚轮转横向。+ components = (ROOT / "web" / "js" / "ui-components.js").read_text(encoding="utf-8")+ self.assertIn("const BOARD_EDGE_SCROLLERS='.reviewtabs,.ftablewrap';", components)+ self.assertIn("if(el.matches(BOARD_EDGE_SCROLLERS)&&localStorage.getItem('peach.legacy-ui')!=='true'){", components)+ self.assertIn("'.reviewtabs','.junkfilters','.ftablewrap',", components)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("const FOLLOW_TABLE_SORT={author:'name',source:'source',provider:'provider',status:'status',checked:'checked'};")self.assertPageContains("${followTableHeader('author','作者')}")self.assertPageContains("${followTableHeader('checked','上次检查')}")+ self.assertPageContains("const bySource=FOLLOW_SOURCE_SORTS[followManageSort];")+ self.assertPageContains("groups.forEach(group=>group.sort((a,b)=>flip*bySource(a,b)));")+ self.assertPageContains("return groups.sort((a,b)=>flip*bySource(a[0],b[0])||byName(a,b));")+ self.assertPageContains("const pairs=groups.flatMap(group=>group.map(source=>[source,group]));")+ self.assertPageContains("pairs.sort(([a],[b])=>flip*bySource(a,b));")+ self.assertPageContains("if(state==='error'||state==='unauthorized')return 0;\n if(!source.enabled)return 1;\n return state==='ok'?3:2;")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}排序">'@@ -2885,16 +2911,16 @@ class FollowWebSourceTests(unittest.TestCase):def test_follow_management_list_has_routed_sorting(self):self.assertPageContains("{label:'关注列表排序',attr:'data-follow-sort'}")self.assertPageContains(- "const FOLLOW_SORT_OPTIONS=[['checked','检查时间'],['added','添加时间'],"- "['name','作者名称'],['sources','来源数量']]")- self.assertPageContains("followManageSort=['checked','added','name','sources'].includes(requested)?requested:'checked'")+ "const FOLLOW_SORT_OPTIONS=[['checked','检查时间'],['added','添加时间'],['name','作者名称'],['sources','来源数量'],\n"+ " ['source','来源名称'],['provider','站点'],['status','状态']];")+ self.assertPageContains("followManageSort=FOLLOW_SORT_OPTIONS.some(([key])=>key===requested)?requested:'checked'")self.assertPageContains("const added=group=>Math.max(...group.map(source=>Date.parse(source.created_at||'')||0))")self.assertPageContains("if(followManageSort==='added')return flip*(added(b)-added(a))||byName(a,b);")# 每条比较器写的都是该列的默认方向,`flip` 只在方向偏离默认时取反:写成# 「asc 就取反」的话,作者名称默认本来就是正序,一进页面就被翻成倒序。self.assertPageContains("const flip=followManageDir===(FOLLOW_SORT_DEFAULT_DIR[followManageSort]||'desc')?1:-1;")- self.assertPageContains("const FOLLOW_SORT_DEFAULT_DIR={checked:'desc',added:'desc',name:'asc',sources:'desc'};")+ self.assertPageContains("const FOLLOW_SORT_DEFAULT_DIR={checked:'desc',added:'desc',name:'asc',sources:'desc',source:'asc',provider:'asc',status:'asc'};")# 方向键与排序下拉并排,名称播报点下去会得到什么。self.assertPageContains("<button class=\"fbtn fmanagedir\" type=\"button\" data-follow-dir aria-label=\"${")self.assertPageContains("icon(followManageDir==='asc'?'arrow-up':'arrow-down')")diff --git a/tests/test_web_ui.py b/tests/test_web_ui.pyindex cebfe03af..cec72f9b0 100644--- a/tests/test_web_ui.py+++ b/tests/test_web_ui.py@@ -5371,11 +5371,49 @@ class WebUiSourceTests(unittest.TestCase):board = (Path(__file__).resolve().parents[1] / "web/board.css").read_text(encoding="utf-8")self.assertIn(".board-icon-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}", board)self.assertIn(".board-icon-grid label{position:relative;display:grid;place-items:center;height:40px;border-radius:8px;cursor:pointer}", board)- self.assertIn(".board-icon-grid svg{width:22px;height:22px}", board)+ # 格子里和触发钮上是同一枚字形:同 20px、同 2 描边、同一个 20px 的盒子居中。+ self.assertIn(".board-icon-trigger svg,.board-icon-grid svg{display:block;width:20px;height:20px;stroke-width:2}", board)+ self.assertIn(".board-icon-trigger>span:first-child,.board-icon-grid label>span{display:inline-flex;align-items:center;"+ "justify-content:center;width:20px;height:20px;flex:none}", board)self.assertNotIn(".board-icon-grid small", board)picker = (Path(__file__).resolve().parents[1] / "frontend/src/library-icon-picker.tsx").read_text(encoding="utf-8")self.assertNotIn("<small>{name}</small>", picker)- self.assertIn("<label title={name} class={draft===key?'selected':''}>", picker)+ self.assertIn("<label title={choiceLabel(key,name)} class={draft===key?'selected':''}>", picker)+ # 42 枚候选每一枚都在服务端白名单和雪碧图里;网盘库不另选时用来源站标,本地路径就是默认磁盘。+ choices = re.findall(r"\['([a-z0-9-]*)', ?'([^']+)'\]", picker.split("LIBRARY_ICON_CHOICES = [", 1)[1].split("] as const", 1)[0])+ self.assertEqual(len(choices), 42)+ from peach.media_libraries import LIBRARY_ICONS+ for key, _name in choices[1:]:+ self.assertIn(key, LIBRARY_ICONS)+ self.assertPageContains(f'<symbol id="i-{key}" viewBox="0 0 24 24">')+ self.assertIn("return mark?[mark,'自动识别']:['hard-drive','默认'];", picker)+ self.assertIn("kind={kinds[index] || 'local'}",+ (Path(__file__).resolve().parents[1] / "frontend/src/islands/configuration.tsx").read_text(encoding="utf-8"))++ def test_the_follow_list_is_one_card_and_its_checkboxes_draw_their_tick(self):+ """关注列表整段进框,和「添加关注」同一只卡;来源行是 boardui 的 CheckboxCard,勾选框照+ checkbox-glyph.tsx:未选 1px 边加 shadow-xs、悬停只深边线不换底,选中蓝渐变加内嵌高光,+ 勾 200ms 从零画出。分区标题行里的视图开关与同排按钮同高,图标与 fbtn 的字形同粗。+ """+ board = (Path(__file__).resolve().parents[1] / "web/board.css").read_text(encoding="utf-8")+ self.assertNotIn(".followmanage .fmain>.fsec:has(.fsources){background:none}", board)+ self.assertIn(".followmanage .fmain>.fsec:has(.fsources)>.fsechead{padding:20px 24px 8px}", board)+ self.assertIn(".followmanage .fsec:has(.board-follow-selection){padding:0;border-radius:18px;background:var(--ground);overflow:visible}"+ ".followmanage .fsec>.board-follow-selection{padding:4px 24px 12px}", board)+ self.assertIn(".followmanage .fmain>.fsec>.fsources{padding:0 24px 24px;grid-template-columns:minmax(0,1fr);gap:16px}", board)+ self.assertIn(".followmanage .board-follow-list .fauthor{background:var(--color-background-primary-default);border-radius:var(--surface-radius);padding:16px}", board)+ self.assertIn(".followmanage .board-follow-list .fsource.frow{min-height:0;margin:0;padding:12px 20px 12px 16px;border:1px solid var(--color-border-button-default);"+ "border-radius:10px;background:var(--color-background-primary-default);transition:background-color .15s ease,border-color .15s ease}", board)+ self.assertIn(".followmanage .board-follow-list .fsource.frow:hover{background:var(--color-background-primary-hover)}", board)+ self.assertIn(".followmanage .fsechead .iconswitch[data-board-segments]>label{width:34px;height:30px;border-radius:7px}", board)+ self.assertIn(".followmanage .fsechead .iconswitch svg{width:16px;height:16px;stroke-width:1.8}", board)+ self.assertIn("--color-border-checkbox-default:#d4d4d4;--color-border-checkbox-hover:#a3a3a3", board)+ self.assertIn("--color-border-checkbox-default:#404040;--color-border-checkbox-hover:#737373", board)+ self.assertIn(".pcheck:hover>span,label:hover>.pcheck>span{border-color:var(--color-border-checkbox-hover);background:var(--color-background-primary-default)}", board)+ self.assertIn(".pcheck input:is(:checked,:indeterminate)+span{border-color:transparent;background:var(--board-blue);"+ "box-shadow:inset 0 2px 0 0 #ffffff40,inset 0 0 0 1px #3b82f6}", board)+ self.assertIn("@keyframes board-check-draw{from{stroke-dashoffset:23px}to{stroke-dashoffset:0}}", board)+ self.assertIn(".pcheck input:checked+span svg{animation:board-check-draw .2s cubic-bezier(.65,0,.35,1) forwards}", board)def test_the_board_layer_shares_one_tabs_segments_and_chart_motion(self):"""口味页、复核页与首页工具栏的控件都用 Board 那一份:下划线 Tabs 的蓝线会滑,diff --git a/web/app.js b/web/app.jsindex 9f176b49a..1ef8929eb 100644--- a/web/app.js+++ b/web/app.js@@ -62,8 +62,10 @@ let followData=null,followRuntime=null,followCredentials=null,followFilter='',foconst FOLLOW_SORT_LABELS={checked:'检查时间',added:'添加时间',name:'作者名称',sources:'来源数量'};const FOLLOW_SORT_DIR_WORDS={checked:['从近到远','从远到近'],added:['从近到远','从远到近'],name:['倒序','正序'],sources:['从多到少','从少到多']};-const FOLLOW_SORT_DEFAULT_DIR={checked:'desc',added:'desc',name:'asc',sources:'desc'};-const FOLLOW_SORT_OPTIONS=[['checked','检查时间'],['added','添加时间'],['name','作者名称'],['sources','来源数量']];+const FOLLOW_SORT_DEFAULT_DIR={checked:'desc',added:'desc',name:'asc',sources:'desc',source:'asc',provider:'asc',status:'asc'};+/* 工具栏下拉与表格表头是同一份维度:前四个按作者分组比,后三个按单条来源比。 */+const FOLLOW_SORT_OPTIONS=[['checked','检查时间'],['added','添加时间'],['name','作者名称'],['sources','来源数量'],+ ['source','来源名称'],['provider','站点'],['status','状态']];/* 同 `sortButtonHtml`:这枚键的无障碍名称说的是点下去会得到什么,所以取反方向的词。 */const followSortLabel=()=>`按${FOLLOW_SORT_LABELS[followManageSort]||'关注列表'}${(FOLLOW_SORT_DIR_WORDS[followManageSort]||[])[followManageDir==='asc'?0:1]||''}排序`;@@ -5424,6 +5426,21 @@ async function openFollow(push=true,renderForDetail=false){}/* ── 管的那一页 ── */+/* 状态的排序位:失败最前,其次暂停、未检查,正常最后——正序就是「先看要处理的」。 */+function followStatusRank(source){+ const state=source.last_status;+ if(state==='error'||state==='unauthorized')return 0;+ if(!source.enabled)return 1;+ return state==='ok'?3:2;+}+const followSourceLabel=source=>String(source.label||'');+const bySourceLabel=(a,b)=>followSourceLabel(a).localeCompare(followSourceLabel(b),'zh-CN',{numeric:true});+const FOLLOW_SOURCE_SORTS={+ source:bySourceLabel,+ provider:(a,b)=>String(a.provider_label||'').localeCompare(String(b.provider_label||''),'zh-CN')||bySourceLabel(a,b),+ status:(a,b)=>followStatusRank(a)-followStatusRank(b)||bySourceLabel(a,b),+};+/* 同一个作者在不同站点上是多条来源、一个人。用户截图里 `LazyProcrastinator · fanbox`出现两次(Kemono / Pawchive)、`lazyprocrastinator` 出现两次(Rule34Video /Rule34.xxx),四行读起来像四个人。归组用后端给的 `author_key`——那是实体 id@@ -5448,6 +5465,12 @@ function followAuthorGroups(sources){每换一次方向就整段倒序一遍,看着像列表在乱跳。 */const flip=followManageDir===(FOLLOW_SORT_DEFAULT_DIR[followManageSort]||'desc')?1:-1;const byName=(a,b)=>name(a).localeCompare(name(b),'zh-CN',{numeric:true});+ /* 按单条来源比的维度:先排每位作者名下的来源,作者之间再按各自排在最前的那条比。 */+ const bySource=FOLLOW_SOURCE_SORTS[followManageSort];+ if(bySource){+ groups.forEach(group=>group.sort((a,b)=>flip*bySource(a,b)));+ return groups.sort((a,b)=>flip*bySource(a[0],b[0])||byName(a,b));+ }return groups.sort((a,b)=>{if(followManageSort==='name')return flip*byName(a,b);if(followManageSort==='sources')return flip*(b.length-a.length)||byName(a,b);@@ -5581,17 +5604,24 @@ function followSourceRow(source,selectable=false){/* 表格视图照 boardui.com/components/data-table(取证见 docs/BOARD_UI.md):一行一条来源,作者列每行都写,表头两列能点,点的是工具栏里已有的那两种排序。它有而这里不要的三样:页码——列表本来就是全量;表尾的密度档——视图开关自己就是;表头里的全选——全选连着- 批量动作留在上面那条选择栏,两个全选框会互相打架。排序方向沿用工具栏那对箭头字形。 */-const FOLLOW_TABLE_SORT={author:'name',checked:'checked'};+ 批量动作留在上面那条选择栏,两个全选框会互相打架。排序方向沿用工具栏那对箭头字形。+ 五列都能点:作者、上次检查按作者分组比,来源、站点、状态按单条来源比,此时表格按+ 那一列拉平排,不再按作者聚在一起。 */+const FOLLOW_TABLE_SORT={author:'name',source:'source',provider:'provider',status:'status',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 pairs=groups.flatMap(group=>group.map(source=>[source,group]));+ const bySource=FOLLOW_SOURCE_SORTS[followManageSort];+ if(bySource){+ const flip=followManageDir===(FOLLOW_SORT_DEFAULT_DIR[followManageSort]||'desc')?1:-1;+ pairs.sort(([a],[b])=>flip*bySource(a,b));+ }+ const rows=pairs.map(([source,group])=>{+ const name=followAuthorName(group);const cell=followSourceCells(source,selectable);return `<tr class="${cell.className}"><td class="ftcheck">${cell.check}</td>@@ -5601,14 +5631,14 @@ function followSourceTable(groups,selectable){<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>+ // 外框只管边线与圆角,里层只管横向滚动:渐隐遮罩落在里层,右边线才不会跟着内容一起淡掉。+ return `<div class="ftableframe"><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('source','来源')}${followTableHeader('provider','站点')}${followTableHeader('status','状态')}${followTableHeader('checked','上次检查')}- <th scope="col"><span class="sr-only">操作</span></th></tr></thead><tbody>${rows}</tbody></table></div>`;+ <th scope="col"><span class="sr-only">操作</span></th></tr></thead><tbody>${rows}</tbody></table></div></div>`;}function followAliasManager(groups,suggestions){@@ -5703,10 +5733,20 @@ function followLayoutButtons(){function setFollowListLayout(value){appSettings.followLayout=value;saveSettings();- // 两种视图的 DOM 不同,切换走排序那条重画路径:拿手里这份 followData 重画,不重取接口、- // 不换骨架。勾选记在 followSourceSelection 里,收起的作者记在 collapsedFollowAuthors 里,- // 重画后都还在。- renderFollowManage(followCredentials||{});+ // 两种视图的 DOM 不同,但换的只有列表本身:只重画 `.fsources`,页头那枚开关留在原地,+ // 滑块才有得滑。拿手里这份 followData 重画,不重取接口、不换骨架;勾选记在+ // followSourceSelection 里,收起的作者记在 collapsedFollowAuthors 里,重画后都还在。+ const list=document.querySelector('#stats .fsources');+ if(!list){renderFollowManage(followCredentials||{});return}+ list.dataset.layout=value;+ list.innerHTML=followSourceListHtml(followAuthorGroups(followData.sources||[]));+ wireFollowManage(followCredentials?.providers||[]);+}+function followSourceListHtml(groups){+ const legacy=localStorage.getItem('peach.legacy-ui')==='true';+ return followListLayout()==='table'?followSourceTable(groups,!legacy)+ :legacy?groups.map(followAuthorBlock).join('')+ :`<div class="board-follow-list">${groups.map(followAuthorBlock).join('')}</div>`;}/* 版式判据来自 docs/reference-sources.json 的 vercel-report-design:@@ -5717,9 +5757,7 @@ function renderFollowManage(credentials){const sources=followData.sources||[],counts=followData.counts||{};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 sourceList=followSourceListHtml(groups);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));@@ -5806,7 +5844,7 @@ async function openFollowManage(push=true){if(push){followManageSort='checked';followManageDir='desc';route('/follow-manage')}else if(location.pathname==='/follow-manage'){const params=new URLSearchParams(location.search),requested=params.get('sort');- followManageSort=['checked','added','name','sources'].includes(requested)?requested:'checked';+ followManageSort=FOLLOW_SORT_OPTIONS.some(([key])=>key===requested)?requested:'checked';const requestedDir=params.get('dir');followManageDir=requestedDir==='asc'||requestedDir==='desc'?requestedDir:(FOLLOW_SORT_DEFAULT_DIR[followManageSort]||'desc');diff --git a/web/board.css b/web/board.cssindex 6cb195312..b6798311e 100644--- a/web/board.css+++ b/web/board.css@@ -450,7 +450,7 @@ 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{gap:28px}.followmanage .fmain>.fsec>.fsources{padding:0 24px 24px;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}@@ -494,7 +494,7 @@ body button.danger:not(.frowicon):hover:not(:disabled){background:linear-gradien.board-sidebar-head #brandHome .mark{color:var(--glass-text)}.followmanage .fsec>.faliasmanager,.followmanage .fsec>.faliasmanager[open]{background:transparent}.followmanage .fcred{box-sizing:border-box;min-height:64px;padding:16px}.followmanage .fcred summary{box-sizing:border-box;min-height:32px;margin:0;padding:0}.followmanage .fcred.none{height:64px;align-items:center}-.followmanage .fmain>.fsec:has(>.fsecfoot){overflow:hidden;border-radius:var(--surface-radius)}+.followmanage .fmain>.fsec:has(>.fsecfoot){overflow:hidden;border-radius:18px}.followmanage .fmain>.fsec:has(>.fsecfoot)>.frows,.followmanage .fmain>.fsec:has(>.fsecfoot) .board-follow-list,.followmanage .fmain>.fsec:has(>.fsecfoot) .fauthor:last-child{border-bottom-left-radius:0;border-bottom-right-radius:0}.followmanage .fmain>.fsec>.fsecfoot{border-top-left-radius:0;border-top-right-radius:0}.configfieldset>.geist-fieldset-footer,.cleanupfieldset>.geist-fieldset-footer,.resourcesyncfooter,.resourceapplyrow{border-top-left-radius:0;border-top-right-radius:0;background:var(--board-card-foot)}@@ -505,7 +505,7 @@ body button.danger:not(.frowicon):hover:not(:disabled){background:linear-gradien/* 表格视图在 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 .ftableframe{border:1px solid var(--color-separator-border);border-radius:var(--surface-radius);background:var(--color-background-primary-default);overflow:hidden}.followmanage .ftablewrap{border-radius:0;background:transparent}.followmanage .ftable th{border-top:0}.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}}@@ -561,7 +561,7 @@ body :is(.sbadge.ok,.board-chip.success){background:color-mix(in srgb,#84cc16 16.followmanage .fsource.selected{background:var(--color-background-primary-default);box-shadow:none;border-color:var(--color-border-focus-ring)}.followmanage .fsource.selected.disabled{opacity:1}.followmanage .fsource:has([data-follow-select]){border:1px solid var(--color-border-button-default);border-radius:10px;padding:12px 20px 12px 16px;margin:8px 0;cursor:pointer;transition:background-color 150ms ease,border-color 150ms ease}.followmanage .fsource:has([data-follow-select]):hover{background:var(--color-background-primary-hover)}-.followmanage .fsec:has(.board-follow-selection){padding:20px;border-radius:20px;background:var(--color-background-secondary-default);overflow:visible}+.followmanage .fsec:has(.board-follow-selection){padding:0;border-radius:18px;background:var(--ground);overflow:visible}.followmanage .fsec>.board-follow-selection{padding:4px 24px 12px}.followmanage .fsourceactions{padding:2px;overflow:visible}body .sbadge.paused{background:color-mix(in srgb,#ffc600 18%,var(--color-background-primary-default));color:#a87600}:root[data-theme=dark] .sbadge.paused{color:#ffd54a}@@ -589,12 +589,12 @@ body [data-board-tabs] button[aria-selected=true],body .managebar [data-board-ta@media(prefers-reduced-motion:reduce){[data-board-tabs].board-tabs-ready::before{transition:none}}.followmanage .fsource:has([data-follow-select]){background:var(--color-background-primary-default)}.followmanage .fsource.selected:has([data-follow-select]){border-color:var(--color-border-focus-ring)}-.board-icon-trigger{width:100%;justify-content:flex-start!important;min-height:var(--control-h);height:var(--control-h)!important}.board-icon-trigger svg{width:20px;height:20px}+.board-icon-trigger{width:100%;gap:8px;justify-content:flex-start!important;min-height:var(--control-h);height:var(--control-h)!important}.board-icon-trigger>span:first-child,.board-icon-grid label>span{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;flex:none}.board-icon-trigger svg,.board-icon-grid svg{display:block;width:20px;height:20px;stroke-width:2}.board-icon-trigger img,.board-icon-grid img{display:block;width:20px;height:20px;margin:0}.splitbutton.board-button-group>.splitmain,.splitbutton.board-button-group>.splittoggle{border:0;border-radius:0;box-shadow:none}.splitbutton.board-button-group>.splittoggle::before{width:1px;left:0;top:6px;bottom:6px;background:var(--color-border-button-default)}body [data-cleanup-empty][hidden]{display:none}dialog.board-icon-popover{position:fixed;inset:auto;margin:0;width:min(360px,calc(100vw - 16px));max-height:calc(100dvh - 16px);box-sizing:border-box;padding:8px;border:0;border-radius:24px;background:var(--color-background-secondary-default);color:var(--ink);box-shadow:0 12px 40px #00000024;overflow:auto}-.board-icon-popover::backdrop{background:transparent}.board-icon-panel{padding:12px;border-radius:20px;background:var(--color-background-primary-default);box-shadow:0 1px 2px #0000000d}.board-icon-panel h3{font:var(--board-body-medium);margin:0 0 10px;padding:0 4px}.board-icon-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}.board-icon-grid label{position:relative;display:grid;place-items:center;height:40px;border-radius:8px;cursor:pointer}.board-icon-grid label:hover{background:var(--color-background-primary-hover)}.board-icon-grid label.selected{background:var(--picked);color:var(--tungsten)}.board-icon-grid input{position:absolute;opacity:0;width:1px;height:1px}.board-icon-grid label:focus-within{outline:2px solid var(--tungsten)}.board-icon-grid svg{width:22px;height:22px}.board-icon-popover footer{display:flex;justify-content:flex-end;gap:8px;padding:8px 4px 0}+.board-icon-popover::backdrop{background:transparent}.board-icon-panel{padding:12px;border-radius:20px;background:var(--color-background-primary-default);box-shadow:0 1px 2px #0000000d}.board-icon-panel h3{font:var(--board-body-medium);margin:0 0 10px;padding:0 4px}.board-icon-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}.board-icon-grid label{position:relative;display:grid;place-items:center;height:40px;border-radius:8px;cursor:pointer}.board-icon-grid label:hover{background:var(--color-background-primary-hover)}.board-icon-grid label.selected{background:var(--picked);color:var(--tungsten)}.board-icon-grid input{position:absolute;opacity:0;width:1px;height:1px}.board-icon-grid label:focus-within{outline:2px solid var(--tungsten)}.board-icon-popover footer{display:flex;justify-content:flex-end;gap:8px;padding:8px 4px 0}.reviewitem .reviewstage[data-framed]{padding:0;border:0;background:transparent;box-shadow:none}.reviewitem .reviewtags{min-height:28px;align-content:start}.reviewitem .reviewempty{min-height:160px;max-height:190px;border-radius:12px;background:var(--color-background-secondary-default)}.reviewitem .reviewstage{flex:0 0 auto}.reviewitem .reviewevidence{border:0;padding:12px 0 0}.reviewitem .reviewactions{border:0;border-radius:0 0 16px 16px;background:var(--color-background-secondary-default);margin-top:auto}.reviewitem{content-visibility:auto;contain-intrinsic-size:auto var(--review-fieldset-height)}body .reviewactions button,body .junkactions button:not(.danger){height:36px;border:1px solid var(--color-border-button-default);border-radius:10px;padding:8px 12px;background:var(--color-background-primary-default);color:var(--ink);box-shadow:0 1px 2px #0000000d;font:var(--board-body-medium)}@@ -702,3 +702,40 @@ body .reviewactions button:disabled{opacity:.5;cursor:not-allowed}#tiers .av:hover .ring,#tiers .av[aria-pressed="true"] .ring{box-shadow:none}#tiers .av .nm{display:block;max-width:12em;font:inherit;color:inherit;text-align:left;overflow:hidden;text-overflow:ellipsis}@media(prefers-reduced-motion:reduce){.board-ranked-chart .board-rank-fill,.tasteranks .taste-rank-track i,.board-radar .board-radar-value{animation:none;transform:none;opacity:1}}++/* ── 关注列表整段进框,与「添加关注」同一只卡:头 20/24/8,选择栏与列表左右 24,脚是卡片脚 ──+ 作者卡是 primary 面上的一只卡;来源行照 boardui checkbox-card.tsx:10px 圆角、1px border-button-default、+ pl 16 / pr 20 / py 12,悬停 primary-hover 150ms;行距 8px。选中行沿用焦点环色的边(上游 CheckboxCard 只亮勾选框)。 */+.followmanage .fmain>.fsec:has(.fsources)>.fsechead{padding:20px 24px 8px}+.followmanage .fmain>.fsec:has(>.fsecfoot)>.fsources{padding-bottom:20px}+.followmanage .board-follow-list{padding:0;background:transparent;gap:16px}+.followmanage .board-follow-list .fauthor{background:var(--color-background-primary-default);border-radius:var(--surface-radius);padding:16px}+.followmanage .board-follow-list .fauthorsources{display:grid;gap:8px}+.followmanage .board-follow-list .fsource.frow{min-height:0;margin:0;padding:12px 20px 12px 16px;border:1px solid var(--color-border-button-default);border-radius:10px;background:var(--color-background-primary-default);transition:background-color .15s ease,border-color .15s ease}+.followmanage .board-follow-list .fsource.frow+.fsource.frow{border-top:1px solid var(--color-border-button-default)}+.followmanage .board-follow-list .fsource.frow:hover{background:var(--color-background-primary-hover)}+.followmanage .board-follow-list .fsource.selected,.followmanage .board-follow-list .fsource.selected:hover{background:var(--color-background-primary-default);border-color:var(--color-border-focus-ring)}+@media(max-width:760px){.followmanage .fmain>.fsec:has(.fsources)>.fsechead{padding:16px 16px 8px}.followmanage .fmain>.fsec>.fsources{padding:0 16px 16px}.followmanage .fsec>.board-follow-selection{padding:4px 16px 12px}.followmanage .board-follow-list .fauthor{padding:12px}}+/* ── 表格:外框管边线与圆角,里层管横向滚动与两端渐隐;接着卡片脚时下面两角不圆。选中行是蓝色 8% 的一层底,不描蓝线(上游选中行样式未取得) ── */+.followmanage .fmain>.fsec:has(>.fsecfoot) .ftableframe{border-bottom:0;border-bottom-left-radius:0;border-bottom-right-radius:0}+.followmanage .ftable tr.fsource.selected,.followmanage .ftable tr.fsource.selected:hover{background:color-mix(in srgb,var(--tungsten) 8%,var(--color-background-primary-default));border-color:var(--color-separator-border);box-shadow:none}+.followmanage .ftable tbody tr{transition:background-color .15s ease}+.followmanage .ftable tbody tr:last-child{border-bottom:0}+/* ── 分区标题行里的视图开关与同排按钮同高(36px):轨道 3px、选项 30px,图标 16px、1.8 描边与 fbtn 的字形同粗 ── */+.followmanage .fsechead .iconswitch[data-board-segments]{padding:3px;border-radius:10px;gap:2px}+.followmanage .fsechead .iconswitch[data-board-segments]>label{width:34px;height:30px;border-radius:7px}+.followmanage .fsechead .iconswitch[data-board-segments]>.board-segment-thumb{border-radius:7px}+.followmanage .fsechead .iconswitch svg{width:16px;height:16px;stroke-width:1.8}+/* ── 勾选框(boardui checkbox-glyph.tsx):未选 1px border-checkbox-default 加 shadow-xs,悬停边线深一档、底不变;+ 选中蓝渐变 + 内嵌高光;勾 2px 圆头,200ms cubic-bezier(.65,0,.35,1) 从零画出。tokens:亮 neutral-300/400,暗 neutral-700/500。 ── */+:root,:root[data-theme="light"]{--color-border-checkbox-default:#d4d4d4;--color-border-checkbox-hover:#a3a3a3}+:root[data-theme="dark"]{--color-border-checkbox-default:#404040;--color-border-checkbox-hover:#737373}+@media(prefers-color-scheme:dark){:root:not([data-theme]){--color-border-checkbox-default:#404040;--color-border-checkbox-hover:#737373}}+.pcheck>span{border-color:var(--color-border-checkbox-default);box-shadow:0 1px 2px 0 #0000000d;transition:background-color .15s ease,border-color .15s ease,box-shadow .15s ease}+.pcheck:hover>span,label:hover>.pcheck>span{border-color:var(--color-border-checkbox-hover);background:var(--color-background-primary-default)}+.pcheck input:is(:checked,:indeterminate)+span{border-color:transparent;background:var(--board-blue);box-shadow:inset 0 2px 0 0 #ffffff40,inset 0 0 0 1px #3b82f6}+.pcheck:hover input:is(:checked,:indeterminate)+span,label:hover>.pcheck input:is(:checked,:indeterminate)+span{border-color:transparent;background:linear-gradient(180deg,#60a5fa,#3b82f6);box-shadow:inset 0 2px 0 0 #ffffff40,inset 0 0 0 1px #3b82f6}+.pcheck>span svg{stroke-dasharray:23;stroke-dashoffset:0}+@keyframes board-check-draw{from{stroke-dashoffset:23px}to{stroke-dashoffset:0}}+.pcheck input:checked+span svg{animation:board-check-draw .2s cubic-bezier(.65,0,.35,1) forwards}+@media(prefers-reduced-motion:reduce){.pcheck input:checked+span svg{animation:none;stroke-dashoffset:0}}diff --git a/web/dist/peach-ui.js b/web/dist/peach-ui.jsindex ecd973fbb..041c5eb04 100644--- a/web/dist/peach-ui.js+++ b/web/dist/peach-ui.js@@ -2420,49 +2420,74 @@ var Pn = [["heart-hand", "亲密"],["flame", "热情"],["cherry", "樱桃"],+ ["lollipop", "甜心"],+ ["candy", "糖果"],+ ["banana", "香蕉"],+ ["droplets", "湿润"],+ ["venus", "女性"],+ ["mars", "男性"],+ ["venus-and-mars", "情侣"],["gem", "精选"],["crown", "女王"],+ ["ribbon", "丝带"],["shirt", "制服"],+ ["graduation-cap", "学生"],+ ["stethoscope", "护士"],+ ["glasses", "眼镜"],["footprints", "足迹"],+ ["hand", "手部"],["flower", "花朵"],["venetian-mask", "角色扮演"],- ["hand", "手部"],+ ["rabbit", "兔女郎"],+ ["paw-print", "兽耳"],+ ["dumbbell", "健身"],["bed-double", "卧室"],+ ["bath", "浴室"],+ ["key-round", "私密"],+ ["wine", "微醺"],+ ["cigarette", "烟"],["moon", "夜色"],["sparkles", "幻想"],["camera", "写真"],["video", "影片"],+ ["film", "电影"],+ ["image", "图集"],+ ["gamepad-2", "游戏"],["star", "收藏"],["tags", "主题"]];-function Fn({ value: e, label: t, onChange: n }) {- let [r, i] = V(e), a = W(null), o = W(null), s = (e) => /* @__PURE__ */ J("span", {+function Fn(e) {+ let t = e === "local" ? "" : s[e];+ return t ? [t, "自动识别"] : ["hard-drive", "默认"];+}+function In({ value: e, label: t, kind: n = "local", onChange: r }) {+ let [i, a] = V(e), o = W(null), s = W(null), [c, l] = Fn(n), u = (e) => /* @__PURE__ */ J("span", {"aria-hidden": "true",- dangerouslySetInnerHTML: { __html: _(e || "database") }- });+ dangerouslySetInnerHTML: { __html: _(e || c) }+ }), d = (e, t) => e ? t : l;return /* @__PURE__ */ J("div", {class: "board-icon-picker",children: [/* @__PURE__ */ J("button", {- ref: o,+ ref: s,type: "button",class: "geist-button board-icon-trigger","aria-label": t,"aria-haspopup": "dialog",onClick: () => {- i(e);- let t = a.current, n = o.current.getBoundingClientRect();+ a(e);+ let t = o.current, n = s.current.getBoundingClientRect();t.showModal();let r = t.getBoundingClientRect();t.style.left = `${Math.max(8, Math.min(innerWidth - r.width - 8, n.left))}px`, t.style.top = `${n.bottom + r.height + 8 <= innerHeight ? n.bottom + 4 : Math.max(8, n.top - r.height - 4)}px`;},- children: [s(e), /* @__PURE__ */ J("span", { children: Pn.find(([t]) => t === e)?.[1] || "自动识别" })]+ children: [u(e), /* @__PURE__ */ J("span", { children: d(e, Pn.find(([t]) => t === e)?.[1] || l) })]}), /* @__PURE__ */ J("dialog", {- ref: a,+ ref: o,class: "board-icon-popover","aria-label": `${t}候选`,- onCancel: () => i(e),+ onCancel: () => a(e),onClick: (t) => {- t.target === a.current && (a.current?.close(), i(e));+ t.target === o.current && (o.current?.close(), a(e));},children: [/* @__PURE__ */ J("div", {class: "board-icon-panel",@@ -2471,31 +2496,31 @@ function Fn({ value: e, label: t, onChange: n }) {"aria-label": "候选图标",class: "board-icon-grid",children: Pn.map(([e, n]) => /* @__PURE__ */ J("label", {- title: n,- class: r === e ? "selected" : "",+ title: d(e, n),+ class: i === e ? "selected" : "",children: [/* @__PURE__ */ J("input", {type: "radio",name: `${t}-icon`,- "aria-label": n,+ "aria-label": d(e, n),value: e,- checked: r === e,- onChange: () => i(e)- }), s(e)]+ checked: i === e,+ onChange: () => a(e)+ }), u(e)]}))})]}), /* @__PURE__ */ J("footer", { children: [/* @__PURE__ */ J("button", {type: "button",class: "geist-button",onClick: () => {- i(e), a.current.close();+ a(e), o.current.close();},children: "取消"}), /* @__PURE__ */ J("button", {type: "button",class: "geist-button primary",- disabled: r === e,+ disabled: i === e,onClick: () => {- n(r), a.current.close();+ r(i), o.current.close();},children: "应用"})] })]@@ -2504,18 +2529,18 @@ function Fn({ value: e, label: t, onChange: n }) {}//#endregion//#region src/islands/configuration.tsx-var In = "/api/configuration", Ln = "/api/pick-folder", Rn = 8e3, zn = (e, t) => K(In, t), Bn = ({ html: e, class: t }) => /* @__PURE__ */ J("div", {+var Ln = "/api/configuration", Rn = "/api/pick-folder", zn = 8e3, Bn = (e, t) => K(Ln, t), Vn = ({ html: e, class: t }) => /* @__PURE__ */ J("div", {class: t,dangerouslySetInnerHTML: { __html: e }-}), Vn = (e) => !(e instanceof ot) || e.status !== 400 ? null : e.body?.errors ?? null;-function Hn({ facts: e }) {+}), Hn = (e) => !(e instanceof ot) || e.status !== 400 ? null : e.body?.errors ?? null;+function Un({ facts: e }) {return /* @__PURE__ */ J("section", {class: "configfieldset","data-geist-fieldset": !0,"aria-labelledby": "configFactsTitle",children: /* @__PURE__ */ J("div", {class: "geist-fieldset-content",- children: [/* @__PURE__ */ J(Bn, { html: d("configFactsTitle", "运行信息") }), /* @__PURE__ */ J("dl", {+ children: [/* @__PURE__ */ J(Vn, { html: d("configFactsTitle", "运行信息") }), /* @__PURE__ */ J("dl", {class: "configfacts",children: e.map((e) => /* @__PURE__ */ J(L, { children: [/* @__PURE__ */ J("dt", { children: e.term }), /* @__PURE__ */ J("dd", { children: [e.value, e.download_url ? /* @__PURE__ */ J("span", {class: "confighelp",@@ -2536,7 +2561,7 @@ function Hn({ facts: e }) {})});}-function Un({ data: e }) {+function Wn({ data: e }) {let [t, n] = V(e.media_sources), [r, i] = V(""), a = W(null);H(() => () => a.current?.abort(), []);let o = async (e) => {@@ -2544,7 +2569,7 @@ function Un({ data: e }) {let t = new AbortController();a.current = t, v(e, !0), i("");try {- let e = await K(In, t.signal);+ let e = await K(Ln, t.signal);t.signal.aborted || n(e.media_sources);} catch (e) {t.signal.aborted || i(G(e));@@ -2558,7 +2583,7 @@ function Un({ data: e }) {children: [/* @__PURE__ */ J("div", {class: "geist-fieldset-content",children: [- /* @__PURE__ */ J(Bn, { html: d("configMountsTitle", "挂载状态") }),+ /* @__PURE__ */ J(Vn, { html: d("configMountsTitle", "挂载状态") }),/* @__PURE__ */ J("dl", {class: "configfacts",children: t.map((e) => /* @__PURE__ */ J(L, { children: [/* @__PURE__ */ J("dt", { children: [/* @__PURE__ */ J("span", {@@ -2595,7 +2620,7 @@ function Un({ data: e }) {})]}) : null;}-function Wn({ value: e, label: t, onChange: n }) {+function Gn({ value: e, label: t, onChange: n }) {let r = W(null), i = W(null), a = W(n);return a.current = n, U(() => {let n = r.current;@@ -2621,7 +2646,7 @@ function Wn({ value: e, label: t, onChange: n }) {class: "configsourcecontrol"});}-function Gn({ data: e, receipt: t }) {+function Kn({ data: e, receipt: t }) {let n = e.media_sources?.filter((e) => ["local","115",@@ -2631,7 +2656,7 @@ function Gn({ data: e, receipt: t }) {O !== null && (ee.current[O]?.focus(), k(null));}, [O]), H(() => {if (!E) return;- let e = setTimeout(() => location.assign(E.url), Rn);+ let e = setTimeout(() => location.assign(E.url), zn);return () => clearTimeout(e);}, [E]);let N = (e, t) => {@@ -2650,7 +2675,7 @@ function Gn({ data: e, receipt: t }) {if (t.getAttribute("aria-busy") !== "true") {v(t, !0);try {- let { path: t } = await q(Ln, { initial: r[e] ?? "" });+ let { path: t } = await q(Rn, { initial: r[e] ?? "" });t && (N(e, t), te(e, ""));} catch (t) {te(e, G(t));@@ -2686,7 +2711,7 @@ function Gn({ data: e, receipt: t }) {if (n.preventDefault(), !A.current) {A.current = !0, v(M.current, !0), T("");try {- let n = await q(In, {+ let n = await q(Ln, {revision: j.current,media_dirs: r,...e.media_sources ? { media_sources: r.map((e, t) => ({@@ -2701,7 +2726,7 @@ function Gn({ data: e, receipt: t }) {});j.current = n.revision, x([]), C(""), t("已保存配置"), D(n);} catch (e) {- let t = Vn(e);+ let t = Hn(e);t ? (x(t.media_dirs ?? []), C(t.port ?? "")) : (x([]), C(""), T(G(e)));} finally {A.current = !1, v(M.current, !1);@@ -2712,7 +2737,7 @@ function Gn({ data: e, receipt: t }) {children: [/* @__PURE__ */ J("div", {class: "geist-fieldset-content",children: [- /* @__PURE__ */ J(Bn, { html: d("configTitle", "这台电脑") }),+ /* @__PURE__ */ J(Vn, { html: d("configTitle", "这台电脑") }),/* @__PURE__ */ J("div", {class: "configfield",children: [@@ -2781,9 +2806,10 @@ function Gn({ data: e, receipt: t }) {})] }),/* @__PURE__ */ J("div", {class: "configsourcelabel",- children: ["媒体库图标", /* @__PURE__ */ J(Fn, {+ children: ["媒体库图标", /* @__PURE__ */ J(In, {label: `媒体库图标 ${n + 1}`,value: f[n] || "",+ kind: a[n] || "local",onChange: (e) => {let t = [...f];t[n] = e, m(t);@@ -2792,7 +2818,7 @@ function Gn({ data: e, receipt: t }) {}),/* @__PURE__ */ J("div", {class: "configsourcelabel",- children: ["媒体来源", /* @__PURE__ */ J(Wn, {+ children: ["媒体来源", /* @__PURE__ */ J(Gn, {label: `媒体来源 ${n + 1}`,value: a[n] || "local",onChange: (e) => {@@ -2902,7 +2928,7 @@ function Gn({ data: e, receipt: t }) {})]}), /* @__PURE__ */ J("span", { children: "保存后扫描并补全资料" })]}),- w ? /* @__PURE__ */ J(Bn, { html: p(w, {+ w ? /* @__PURE__ */ J(Vn, { html: p(w, {variant: "error",label: "没有保存"}) }) : null@@ -2919,8 +2945,8 @@ function Gn({ data: e, receipt: t }) {})]});}-function Kn({ receipt: e, data: t, error: n }) {- return n || !t ? /* @__PURE__ */ J(Bn, {+function qn({ receipt: e, data: t, error: n }) {+ return n || !t ? /* @__PURE__ */ J(Vn, {class: "configpage",html: p(n || "没有读到配置", {variant: "error",@@ -2941,14 +2967,14 @@ function Kn({ receipt: e, data: t, error: n }) {class: "configgroup",children: "媒体"}),- t.editable ? /* @__PURE__ */ J(Gn, {+ t.editable ? /* @__PURE__ */ J(Kn, {data: t,receipt: e- }) : /* @__PURE__ */ J(Bn, { html: p(t.notice, {+ }) : /* @__PURE__ */ J(Vn, { html: p(t.notice, {variant: "secondary",label: "只读"}) }),- /* @__PURE__ */ J(Un, { data: t }),+ /* @__PURE__ */ J(Wn, { data: t }),t.peach_proxy || t.access ? /* @__PURE__ */ J("h2", {class: "configgroup",children: "网络与访问"@@ -2969,30 +2995,30 @@ function Kn({ receipt: e, data: t, error: n }) {initial: t.updates,initialJob: t.update_job}) : null,- /* @__PURE__ */ J(Hn, { facts: t.facts }),+ /* @__PURE__ */ J(Un, { facts: t.facts }),t.uninstall ? /* @__PURE__ */ J(jn, { uninstall: t.uninstall }) : null]});}//#endregion//#region node_modules/@preact/signals-core/dist/signals-core.module.js-var qn = Symbol.for("preact-signals");-function Jn() {+var Jn = Symbol.for("preact-signals");+function Yn() {if (Z > 1) Z--;else {var e, t = !1;for ((function() {- var e = nr;- for (nr = void 0; e !== void 0;) {+ var e = rr;+ for (rr = void 0; e !== void 0;) {var t = e.S;if (t.v === e.v) for (var n = t.t; n !== void 0; n = n.x) n.i === e.i && (n.i = t.i);e = e.o;}- })(); Qn !== void 0;) {- var n = Qn;- for (Qn = void 0, $n++; n !== void 0;) {+ })(); $n !== void 0;) {+ var n = $n;+ for ($n = void 0, er++; n !== void 0;) {var r = n.u;- if (n.u = void 0, n.f &= -3, !(8 & n.f) && or(n)) try {+ if (n.u = void 0, n.f &= -3, !(8 & n.f) && sr(n)) try {n.c();} catch (n) {t ||= (e = n, !0);@@ -3000,30 +3026,30 @@ function Jn() {n = r;}}- if ($n = 0, Z--, t) throw e;+ if (er = 0, Z--, t) throw e;}}-function Yn(e) {+function Xn(e) {if (Z > 0) return e();- tr = ++er, Z++;+ nr = ++tr, Z++;try {return e();} finally {- Jn();+ Yn();}}-var Xn, X = void 0;-function Zn(e) {- var t = X, n = Xn;- X = void 0, Xn = void 0;+var Zn, X = void 0;+function Qn(e) {+ var t = X, n = Zn;+ X = void 0, Zn = void 0;try {return e();} finally {- X = t, Xn = n;+ X = t, Zn = n;}}-var Qn = void 0, Z = 0, $n = 0, er = 0, tr = 0, nr = void 0, rr = 0;-function ir(e) {+var $n = void 0, Z = 0, er = 0, tr = 0, nr = 0, rr = void 0, ir = 0;+function ar(e) {if (X !== void 0) {var t = e.n;if (t === void 0 || t.t !== X) return t = {@@ -3042,11 +3068,11 @@ function ir(e) {function Q(e, t) {this.v = e, this.i = 0, this.n = void 0, this.t = void 0, this.l = 0, this.W = t?.watched, this.Z = t?.unwatched, this.name = t?.name;}-Q.prototype.brand = qn, Q.prototype.h = function() {+Q.prototype.brand = Jn, Q.prototype.h = function() {return !0;}, Q.prototype.S = function(e) {var t = this, n = this.t;- n !== e && e.e === void 0 && (e.x = n, this.t = e, n === void 0 ? Zn(function() {+ n !== e && e.e === void 0 && (e.x = n, this.t = e, n === void 0 ? Qn(function() {var e;(e = t.W) == null || e.call(t);}) : n.e = e);@@ -3054,16 +3080,16 @@ Q.prototype.brand = qn, Q.prototype.h = function() {var t = this;if (this.t !== void 0) {var n = e.e, r = e.x;- n !== void 0 && (n.x = r, e.e = void 0), r !== void 0 && (r.e = n, e.x = void 0), e === this.t && (this.t = r, r === void 0 && Zn(function() {+ n !== void 0 && (n.x = r, e.e = void 0), r !== void 0 && (r.e = n, e.x = void 0), e === this.t && (this.t = r, r === void 0 && Qn(function() {var e;(e = t.Z) == null || e.call(t);}));}}, Q.prototype.subscribe = function(e) {var t = this;- return hr(function() {+ return gr(function() {var n = t.value;- Zn(function() {+ Qn(function() {return e(n);});}, { name: "sub" });@@ -3075,41 +3101,41 @@ Q.prototype.brand = qn, Q.prototype.h = function() {return this.value;}, Q.prototype.peek = function() {var e = this;- return Zn(function() {+ return Qn(function() {return e.value;});}, Object.defineProperty(Q.prototype, "value", {get: function() {- var e = ir(this);+ var e = ar(this);return e !== void 0 && (e.i = this.i), this.v;},set: function(e) {if (e !== this.v) {- if ($n > 100) throw Error("Cycle detected");+ if (er > 100) throw Error("Cycle detected");(function(e) {- Z !== 0 && $n === 0 && e.l !== tr && (e.l = tr, nr = {+ Z !== 0 && er === 0 && e.l !== nr && (e.l = nr, rr = {S: e,v: e.v,i: e.i,- o: nr+ o: rr});- })(this), this.v = e, this.i++, rr++, Z++;+ })(this), this.v = e, this.i++, ir++, Z++;try {for (var t = this.t; t !== void 0; t = t.x) t.t.N();} finally {- Jn();+ Yn();}}}});-function ar(e, t) {+function or(e, t) {return new Q(e, t);}-function or(e) {+function sr(e) {for (var t = e.s; t !== void 0; t = t.n) if (t.S.i !== t.i || !t.S.h() || t.S.i !== t.i) return !0;return !1;}-function sr(e) {+function cr(e) {for (var t = e.s; t !== void 0; t = t.n) {var n = t.S.n;if (n !== void 0 && (t.r = n), t.S.n = t, t.i = -1, t.n === void 0) {@@ -3118,55 +3144,55 @@ function sr(e) {}}}-function cr(e) {+function lr(e) {for (var t = e.s, n = void 0; t !== void 0;) {var r = t.p;t.i === -1 ? (t.S.U(t), r !== void 0 && (r.n = t.n), t.n !== void 0 && (t.n.p = r)) : n = t, t.S.n = t.r, t.r !== void 0 && (t.r = void 0), t = r;}e.s = n;}-function lr(e, t) {- Q.call(this, void 0, t), this.x = e, this.s = void 0, this.g = rr - 1, this.f = 4;+function ur(e, t) {+ Q.call(this, void 0, t), this.x = e, this.s = void 0, this.g = ir - 1, this.f = 4;}-lr.prototype = new Q(), lr.prototype.h = function() {+ur.prototype = new Q(), ur.prototype.h = function() {if (this.f &= -3, 1 & this.f) return !1;- if ((36 & this.f) == 32 || (this.f &= -5, this.g === rr)) return !0;- if (this.g = rr, this.f |= 1, this.i > 0 && !or(this)) return this.f &= -2, !0;+ if ((36 & this.f) == 32 || (this.f &= -5, this.g === ir)) return !0;+ if (this.g = ir, this.f |= 1, this.i > 0 && !sr(this)) return this.f &= -2, !0;var e = X;try {- sr(this), X = this;+ cr(this), X = this;var t = this.x();(16 & this.f || this.v !== t || this.i === 0) && (this.v = t, this.f &= -17, this.i++);} catch (e) {this.v = e, this.f |= 16, this.i++;}- return X = e, cr(this), this.f &= -2, !0;-}, lr.prototype.S = function(e) {+ return X = e, lr(this), this.f &= -2, !0;+}, ur.prototype.S = function(e) {if (this.t === void 0) {this.f |= 36;for (var t = this.s; t !== void 0; t = t.n) t.S.S(t);}Q.prototype.S.call(this, e);-}, lr.prototype.U = function(e) {+}, ur.prototype.U = function(e) {if (this.t !== void 0 && (Q.prototype.U.call(this, e), this.t === void 0)) {this.f &= -33;for (var t = this.s; t !== void 0; t = t.n) t.S.U(t);}-}, lr.prototype.N = function() {+}, ur.prototype.N = function() {if (!(2 & this.f)) {this.f |= 6;for (var e = this.t; e !== void 0; e = e.x) e.t.N();}-}, Object.defineProperty(lr.prototype, "value", { get: function() {+}, Object.defineProperty(ur.prototype, "value", { get: function() {if (1 & this.f) throw Error("Cycle detected");- var e = ir(this);+ var e = ar(this);if (this.h(), e !== void 0 && (e.i = this.i), 16 & this.f) throw this.v;return this.v;} });-function ur(e, t) {- return new lr(e, t);+function dr(e, t) {+ return new ur(e, t);}-function dr(e) {+function fr(e) {var t = e.m;if (e.m = void 0, typeof t == "function") {Z++;@@ -3175,24 +3201,24 @@ function dr(e) {try {t();} catch (t) {- throw e.f &= -2, e.f |= 8, fr(e), t;+ throw e.f &= -2, e.f |= 8, pr(e), t;} finally {- X = n, Jn();+ X = n, Yn();}}}-function fr(e) {+function pr(e) {for (var t = e.s; t !== void 0; t = t.n) t.S.U(t);- e.x = void 0, e.s = void 0, dr(e);+ e.x = void 0, e.s = void 0, fr(e);}-function pr(e) {+function mr(e) {if (X !== this) throw Error("Out-of-order effect");- cr(this), X = e, this.f &= -2, 8 & this.f && fr(this), Jn();+ lr(this), X = e, this.f &= -2, 8 & this.f && pr(this), Yn();}-function mr(e, t) {- this.x = e, this.m = void 0, this.s = void 0, this.u = void 0, this.f = 32, this.name = t?.name, Xn && Xn.push(this);+function hr(e, t) {+ this.x = e, this.m = void 0, this.s = void 0, this.u = void 0, this.f = 32, this.name = t?.name, Zn && Zn.push(this);}-mr.prototype.c = function() {+hr.prototype.c = function() {var e = this.S();try {if (8 & this.f || this.x === void 0) return;@@ -3201,20 +3227,20 @@ mr.prototype.c = function() {} finally {e();}-}, mr.prototype.S = function() {+}, hr.prototype.S = function() {if (1 & this.f) throw Error("Cycle detected");- this.f |= 1, this.f &= -9, dr(this), sr(this), Z++;+ this.f |= 1, this.f &= -9, fr(this), cr(this), Z++;var e = X;- return X = this, pr.bind(this, e);-}, mr.prototype.N = function() {- 2 & this.f || (this.f |= 2, this.u = Qn, Qn = this);-}, mr.prototype.d = function() {- this.f |= 8, 1 & this.f || fr(this);-}, mr.prototype.dispose = function() {+ return X = this, mr.bind(this, e);+}, hr.prototype.N = function() {+ 2 & this.f || (this.f |= 2, this.u = $n, $n = this);+}, hr.prototype.d = function() {+ this.f |= 8, 1 & this.f || pr(this);+}, hr.prototype.dispose = function() {this.d();};-function hr(e, t) {- var n = new mr(e, t);+function gr(e, t) {+ var n = new hr(e, t);try {n.c();} catch (e) {@@ -3225,35 +3251,35 @@ function hr(e, t) {}//#endregion//#region node_modules/@preact/signals/dist/signals.module.js-var gr, _r, vr = typeof window < "u" && !!window.__PREACT_SIGNALS_DEVTOOLS__, yr = [];-hr(function() {- gr = this.N;+var _r, vr, yr = typeof window < "u" && !!window.__PREACT_SIGNALS_DEVTOOLS__, br = [];+gr(function() {+ _r = this.N;})();-function br(e, t) {+function xr(e, t) {S[e] = t.bind(null, S[e] || function() {});}-function xr(e) {- if (_r) {- var t = _r;- _r = void 0, t();+function Sr(e) {+ if (vr) {+ var t = vr;+ vr = void 0, t();}- _r = e && e.S();+ vr = e && e.S();}-function Sr(e) {- var t = this, n = e.data, r = wr(n);+function Cr(e) {+ var t = this, n = e.data, r = Tr(n);r.name = "ReactiveDom", r.value = n;var i = Qe(function() {for (var e = t, n = t.__v; n = n.__;) if (n.__c) {n.__c.__$f |= 4;break;}- var i = ur(function() {+ var i = dr(function() {var e = r.value.value;return e === 0 ? 0 : !0 === e ? "" : e || "";- }), a = ur(function() {+ }), a = dr(function() {return !Array.isArray(i.value) && !w(i.value);- }), o = hr(function() {- if (this.N = Dr, a.value) {+ }), o = gr(function() {+ if (this.N = Or, a.value) {var t = i.value;e.__v && e.__v.__e && e.__v.__e.nodeType === 3 && (e.__v.__e.data = t);}@@ -3264,14 +3290,14 @@ function Sr(e) {}, []), a = i[0], o = i[1];return a.value ? o.peek() : o.value;}-Sr.displayName = "ReactiveTextNode", Object.defineProperties(Q.prototype, {+Cr.displayName = "ReactiveTextNode", Object.defineProperties(Q.prototype, {constructor: {configurable: !0,value: void 0},type: {configurable: !0,- value: Sr+ value: Cr},props: {configurable: !0,@@ -3286,7 +3312,7 @@ Sr.displayName = "ReactiveTextNode", Object.defineProperties(Q.prototype, {configurable: !0,value: 1}-}), br("__b", function(e, t) {+}), xr("__b", function(e, t) {if (typeof t.type == "string") {var n, r = t.props;for (var i in r) if (i !== "children") {@@ -3295,26 +3321,26 @@ Sr.displayName = "ReactiveTextNode", Object.defineProperties(Q.prototype, {}}e(t);-}), br("__r", function(e, t) {+}), xr("__r", function(e, t) {if (e(t), t.type !== L) {- xr();+ Sr();var n, r = t.__c;r && (r.__$f &= -2, (n = r.__$u) === void 0 && (r.__$u = n = function(e, t) {var n;- return hr(function() {+ return gr(function() {n = this;}, { name: t }), n.c = e, n;}(function(e) {return function() {var t;- vr && ((t = this.y) == null || t.call(this)), e.__$f |= 1, e.setState({});+ yr && ((t = this.y) == null || t.call(this)), e.__$f |= 1, e.setState({});};- }(r), typeof t.type == "function" ? t.type.displayName || t.type.name : ""))), xr(n);+ }(r), typeof t.type == "function" ? t.type.displayName || t.type.name : ""))), Sr(n);}-}), br("__e", function(e, t, n, r) {- xr(), e(t, n, r);-}), br("diffed", function(e, t) {- xr();+}), xr("__e", function(e, t, n, r) {+ Sr(), e(t, n, r);+}), xr("diffed", function(e, t) {+ Sr();var n;if (typeof t.type == "string" && (n = t.__e)) {var r = t.__np, i = t.props, a = n.U;@@ -3324,25 +3350,25 @@ Sr.displayName = "ReactiveTextNode", Object.defineProperties(Q.prototype, {}if (r) for (var c in a || (a = {}, n.U = a), r) {var l = a[c], u = r[c];- l === void 0 ? (l = Cr(n, c, u, i), a[c] = l) : l.o(u, i);+ l === void 0 ? (l = wr(n, c, u, i), a[c] = l) : l.o(u, i);}}e(t);});-function Cr(e, t, n, r) {- var i = t in e && e.ownerSVGElement === void 0, a = ar(n);+function wr(e, t, n, r) {+ var i = t in e && e.ownerSVGElement === void 0, a = or(n);return {o: function(e, t) {a.value = e, r = t;},- d: hr(function() {- this.N = Dr;+ d: gr(function() {+ this.N = Or;var n = a.value.value;r[t] !== n && (r[t] = n, i ? e[t] = n : n != null && (!1 !== n || t[4] === "-") ? e.setAttribute(t, n) : e.removeAttribute(t));})};}-br("unmount", function(e, t) {+xr("unmount", function(e, t) {if (typeof t.type == "string") {var n = t.__e;if (n) {@@ -3366,7 +3392,7 @@ br("unmount", function(e, t) {}}e(t);-}), br("__h", function(e, t, n, r) {+}), xr("__h", function(e, t, n, r) {r < 3 && (t.__$f |= 2), e(t, n, r);}), se.prototype.shouldComponentUpdate = function(e, t) {if (this.__R) return !0;@@ -3380,44 +3406,44 @@ br("unmount", function(e, t) {for (var s in this.props) if (!(s in e)) return !0;return !1;};-function wr(e, t) {+function Tr(e, t) {return Qe(function() {- return ar(e, t);+ return or(e, t);}, []);}-var Tr = function(e) {+var Er = function(e) {queueMicrotask(function() {queueMicrotask(e);});};-function Er() {- Yn(function() {- for (var e; e = yr.shift();) gr.call(e);+function Dr() {+ Xn(function() {+ for (var e; e = br.shift();) _r.call(e);});}-function Dr() {- yr.push(this) === 1 && (S.requestAnimationFrame || Tr)(Er);+function Or() {+ br.push(this) === 1 && (S.requestAnimationFrame || Er)(Dr);}//#endregion//#region src/state/quality-goals.ts-var Or = "/api/quality-goals?limit=200", kr = {+var kr = "/api/quality-goals?limit=200", Ar = {data: null,error: ""-}, Ar = ar(kr), jr = 0, Mr = ur(() => Ar.value);-ur(() => Ar.value.data?.total ?? null);-function Nr() {- jr += 1, Ar.value = kr;+}, jr = or(Ar), Mr = 0, Nr = dr(() => jr.value);+dr(() => jr.value.data?.total ?? null);+function Pr() {+ Mr += 1, jr.value = Ar;}-async function Pr(e) {- let t = jr += 1;+async function Fr(e) {+ let t = Mr += 1;try {- let n = await K(Or, e);- return t === jr && (Ar.value = {+ let n = await K(kr, e);+ return t === Mr && (jr.value = {data: n,error: ""}), n;} catch (n) {- throw !e?.aborted && t === jr && (Ar.value = {+ throw !e?.aborted && t === Mr && (jr.value = {data: null,error: G(n)}), n;@@ -3425,9 +3451,9 @@ async function Pr(e) {}//#endregion//#region src/islands/quality-goals.tsx-var Fr = (e, t) => Pr(t), Ir = (e) => e.has_cover ? `/cover?code=${encodeURIComponent(e.code ?? "")}` : `/poster?id=${e.id}&c=4`;-function Lr({ openItem: t, javTitleHtml: n, javDisplayName: a, srcBadge: o }) {- let { data: s, error: c } = Mr.value;+var Ir = (e, t) => Fr(t), Lr = (e) => e.has_cover ? `/cover?code=${encodeURIComponent(e.code ?? "")}` : `/poster?id=${e.id}&c=4`;+function Rr({ openItem: t, javTitleHtml: n, javDisplayName: a, srcBadge: o }) {+ let { data: s, error: c } = Nr.value;if (c) return /* @__PURE__ */ J("div", {class: "qualitylist",dangerouslySetInnerHTML: { __html: p(c, {@@ -3446,7 +3472,7 @@ function Lr({ openItem: t, javTitleHtml: n, javDisplayName: a, srcBadge: o }) {"aria-label": `打开 ${a(s)}`,onClick: () => t(s.id),children: /* @__PURE__ */ J("img", {- src: Ir(s),+ src: Lr(s),alt: "",loading: "lazy",onError: (e) => e.currentTarget.remove()@@ -3480,8 +3506,8 @@ function Lr({ openItem: t, javTitleHtml: n, javDisplayName: a, srcBadge: o }) {}//#endregion//#region src/islands/scraping.tsx-var Rr = (e, t) => K("/api/scraping", t);-function zr({ value: e, onChange: t }) {+var zr = (e, t) => K("/api/scraping", t);+function Br({ value: e, onChange: t }) {let n = W(null), r = W(t);return r.current = t, U(() => {let t = n.current;@@ -3495,7 +3521,7 @@ function zr({ value: e, onChange: t }) {class: "scraping-network"});}-function Br({ source: e, toast: t }) {+function Vr({ source: e, toast: t }) {let [r, i] = V(e), [a, o] = V(e.network), [s, c] = V(""), [l, u] = V(""), [f, m] = V("paste"), [h, g] = V(""), [_, y] = V(!1), [b, x] = V(""), [S, C] = V([]), w = W(null), T = W(null);U(() => {T.current?.querySelectorAll("footer button").forEach((e) => v(e, _));@@ -3566,7 +3592,7 @@ function Br({ source: e, toast: t }) {}),/* @__PURE__ */ J("div", {class: "scraping-label",- children: ["连接方式", /* @__PURE__ */ J(zr, {+ children: ["连接方式", /* @__PURE__ */ J(Br, {value: a,onChange: o})]@@ -3677,7 +3703,7 @@ function Br({ source: e, toast: t }) {})});}-function Vr({ data: e, error: t, toast: n }) {+function Hr({ data: e, error: t, toast: n }) {let [r, i] = V(""), [a, o] = V(!1), [s, c] = V(""), l = W(null);U(() => v(l.current, a), [a]);let u = W(new AbortController()), f = W(0);@@ -3744,7 +3770,7 @@ function Vr({ data: e, error: t, toast: n }) {]})}),- e?.sources.map((e) => /* @__PURE__ */ J(Br, {+ e?.sources.map((e) => /* @__PURE__ */ J(Vr, {source: e,toast: n}, e.source))@@ -3753,12 +3779,12 @@ function Vr({ data: e, error: t, toast: n }) {}//#endregion//#region src/state/index.ts-var Hr = { "quality-goals": {- refresh: Pr,- reset: Nr-} }, Ur = () => Object.keys(Hr);-async function Wr(e) {- let t = Hr[e];+var Ur = { "quality-goals": {+ refresh: Fr,+ reset: Pr+} }, Wr = () => Object.keys(Ur);+async function Gr(e) {+ let t = Ur[e];if (!t) throw Error(`未登记的共享 store:${String(e)}`);try {return await t.refresh(), !0;@@ -3768,24 +3794,24 @@ async function Wr(e) {}//#endregion//#region src/review-evidence.ts-var Gr = (e = "") => /^https?:\/\//i.test(e) ? e : "";-function Kr(e = "") {- let n = Gr(e) || (e.startsWith("/") && !e.startsWith("//") ? e : "");+var Kr = (e = "") => /^https?:\/\//i.test(e) ? e : "";+function qr(e = "") {+ let n = Kr(e) || (e.startsWith("/") && !e.startsWith("//") ? e : "");return `<div class="reviewimage" data-review-picture><span class="reviewimageempty"${n ? " hidden" : ""}>未取得来源图片</span>${n ? `<img src="${t(n)}" alt="来源候选图片" loading="lazy">` : ""}</div>`;}-function qr(e) {- let n = Gr(e.profile_url), r = (e.preview_assets || []).slice(0, 6), i = Math.max(0, Number(e.video_count || e.videos || 0));+function Jr(e) {+ let n = Kr(e.profile_url), r = (e.preview_assets || []).slice(0, 6), i = Math.max(0, Number(e.video_count || e.videos || 0));return `<section class="reviewidentityevidence"><h5>候选身份:${t(e.babepedia_name || "未标注")}</h5><div class="reviewevidenceactions">${n ? `<a class="geist-button externallink" href="${t(n)}" target="_blank" rel="noopener noreferrer">来源资料<svg class="externalmark" viewBox="0 0 24 24" aria-hidden="true"><use href="#i-external-link" /></svg></a>` : ""}<button type="button" class="geist-button" data-entity-kind="creator" data-entity-name="${t(e.creator || "")}">查看全部 ${i.toLocaleString()} 部作品</button></div>- ${Kr(e.preview_url)}+ ${qr(e.preview_url)}<p>通过后记录身份判断。</p>${r.length ? `<h5>本地作品样本</h5><div class="reviewevidencesamples">${r.map((e) => `<div class="reviewevidencesample"><button class="geist-button" type="button" data-review-open-item="${e.id}"><span data-middle-truncate title="${t(e.name)}">${t(e.name)}</span></button><button class="geist-button" type="button" data-review-reveal="${e.id}" aria-label="打开 ${t(e.name)} 的文件位置">文件位置</button></div>`).join("")}</div>` : "<p>暂无本地作品样本,打开全部作品核对。</p>"}</section>`;}-function Jr(e) {+function Yr(e) {for (let t of e.querySelectorAll("[data-review-picture] img")) {let e = () => {t.hidden = !0;@@ -3797,7 +3823,7 @@ function Jr(e) {}//#endregion//#region src/review-bulk.ts-var Yr = () => ({+var Xr = () => ({busy: !1,category: "",filter: "",@@ -3808,7 +3834,7 @@ var Yr = () => ({assets: /* @__PURE__ */ new Map(),errors: /* @__PURE__ */ new Map()});-function Xr(e) {+function Zr(e) {let t = e?.querySelector(".reviewcontrols");if (!e || !t || t.offsetParent === null) return;let n = e.closest("main");@@ -3818,7 +3844,7 @@ function Xr(e) {n.classList.toggle("is-stuck", n.offsetParent !== null && window.scrollY > 0 && Number.isFinite(e) && Math.abs(n.getBoundingClientRect().top - e) <= 1);}}-function Zr(e, t) {+function Qr(e, t) {let n = [["candidates",t ? "按候选数量" : "全部待复核",@@ -3834,7 +3860,7 @@ function Zr(e, t) {"list-filter"]), n;}-function Qr(e, t) {+function $r(e, t) {let n = /* @__PURE__ */ new Map();for (let r of e) {let e, i;@@ -3851,11 +3877,11 @@ function Qr(e, t) {}return [...n.values()];}-function $r(e, t, n, r, i) {+function ei(e, t, n, r, i) {let a = e.anchor === null ? -1 : t.indexOf(e.anchor), o = t.indexOf(n);r && a >= 0 && o >= 0 ? t.slice(Math.min(a, o), Math.max(a, o) + 1).forEach((t) => e.selected.add(t)) : i ? e.selected.add(n) : e.selected.delete(n), e.anchor = n;}-async function ei(e, t, n, r) {+async function ti(e, t, n, r) {let i = [], a = 0;for (let o of e) {if (!r()) break;@@ -3875,17 +3901,17 @@ async function ei(e, t, n, r) {failures: i};}-function ti(e) {+function ni(e) {return e.length ? [...new Set(e.flatMap((e) => e.candidates?.map((e) => e.source || "") || []))].filter((t) => t && e.every((e) => e.candidates?.filter((e) => e.source === t).length === 1)) : [];}-function ni(e, t) {+function ri(e, t) {let n = e.querySelector(".reviewlist");if (!n || !t.rows.length || t.locked) return;let r = t.state, i = [...n.querySelectorAll("[data-review-key]")];t.category !== void 0 && r.category !== t.category && (r.category = t.category, r.filter = "", r.groupBy = "candidates", r.anchor = null);- let a = Zr(t.rows, t.metadata);+ let a = Qr(t.rows, t.metadata);a.some((e) => e[0] === r.groupBy) || (r.groupBy = "candidates", r.filter = "");- let o = Qr(t.rows, r.groupBy);+ let o = $r(t.rows, r.groupBy);o.some((e) => e.key === r.filter) || (r.filter = "");let s = () => [...n.querySelectorAll("[data-review-key]")].filter((e) => !e.closest("[hidden]")), l = () => s().filter((e) => r.selected.has(e.dataset.reviewKey)), u = () => t.rows.filter((e) => l().some((t) => t.dataset.reviewKey === e.item_key)), d = (e) => !e.querySelector("[data-review-status=\"approved\"]")?.disabled, f = (e, t = "") => {let n = document.createElement("button");@@ -3977,7 +4003,7 @@ function ni(e, t) {e.className = "reviewpickname", e.append(...n.childNodes), n.classList.add("reviewpickheading"), n.append(i, e);} else e.prepend(i);let o = (e, n) => {- $r(r, s().map((e) => e.dataset.reviewKey), t, e, n), P();+ ei(r, s().map((e) => e.dataset.reviewKey), t, e, n), P();};if (i.addEventListener("mousedown", (e) => {e.shiftKey && e.preventDefault();@@ -3991,7 +4017,7 @@ function ni(e, t) {else if (n.key === "ArrowDown" || n.key === "ArrowUp") {n.preventDefault();let i = s(), a = i[i.indexOf(e) + (n.key === "ArrowDown" ? 1 : -1)];- a && (r.anchor === null && (r.anchor = t), $r(r, i.map((e) => e.dataset.reviewKey), a.dataset.reviewKey, !0, !0), P(), a.querySelector(".reviewpickitem input")?.focus());+ a && (r.anchor === null && (r.anchor = t), ei(r, i.map((e) => e.dataset.reviewKey), a.dataset.reviewKey, !0, !0), P(), a.querySelector(".reviewpickitem input")?.focus());}}}), M.push(() => {@@ -4020,14 +4046,14 @@ function ni(e, t) {function P() {let e = l();S.textContent = e.length === s().length ? "清空当前选择" : r.filter ? "全选当前分类" : "全选本页", k.hidden = !e.length, T.textContent = `已选 ${e.length} 项`, C.disabled = !e.length || e.some((e) => !d(e)), w.disabled = !e.length;- let n = ti(u());+ let n = ni(u());E.hidden = !t.metadata || !u().some((e) => (e.candidates?.length || 0) > 1);let i = e.length && !n.length ? "所选项目无共同来源" : "统一选择来源", a = JSON.stringify([i, n]);if (a !== N) {N = a, E.innerHTML = g([["", i], ...n.map((e) => [e, e])], "", { label: "统一选择来源" });let e = b(E.firstElementChild);e.disabled = !n.length, e.addEventListener("change", () => {- if (!(r.busy || !ti(u()).includes(e.value))) {+ if (!(r.busy || !ni(u()).includes(e.value))) {for (let n of l()) {let i = t.rows.find((e) => e.item_key === n.dataset.reviewKey).candidates.find((t) => t.source === e.value);n.querySelectorAll("input[type=\"radio\"]").forEach((e) => {@@ -4060,7 +4086,7 @@ function ni(e, t) {e instanceof KeyboardEvent && e.key === "Tab" || (e.preventDefault(), e.stopImmediatePropagation());};e.addEventListener("click", c, !0), e.addEventListener("keydown", c, !0);- let u = 0, d = await ei(a, async (e) => {+ let u = 0, d = await ti(a, async (e) => {try {return await t.submit(e);} finally {@@ -4077,14 +4103,14 @@ function ni(e, t) {let f = e.parentElement;t.refresh(), f?.querySelector(".reviewbulktoolbar button")?.focus({ preventScroll: !0 });}- P(), Xr(e);+ P(), Zr(e);}//#endregion//#region src/native-image.ts-function ri(e, t, n, r) {+function ii(e, t, n, r) {return e > 0 && t > 0 && e === n && t === r;}-function ii(e, t, n, r, i = 1) {+function ai(e, t, n, r, i = 1) {let a = Number.isFinite(i) && i > 0 ? i : 1;e /= a, t /= a;let o = [@@ -4101,7 +4127,7 @@ function ii(e, t, n, r, i = 1) {}//#endregion//#region src/entity-skeleton.ts-function ai(e, t) {+function oi(e, t) {return `<section data-skeleton="entity/${e}" role="status" aria-label="正在读取资料"><span class="sr-only">正在读取资料</span><div aria-hidden="true"><div class="entityhero"><div class="entityportrait ${e === "studio" || e === "agency" ? "square " : ""}skeleton"></div>@@ -4113,7 +4139,7 @@ function ai(e, t) {}//#endregion//#region src/board-skeleton.ts-function oi(e) {+function si(e) {let t = (e = "60%") => `<i class="skeleton" style="width:${e}"></i>`, n = () => `<div class="board-skeleton-row">${t("36%")}${t("24%")}</div>`, r = "";if (e === "/stats" || e === "/taste") r = `${e === "/taste" ? `<div class="board-skeleton-row">${t("26%")}${t("32%")}</div>` : ""}<div class="metricstrip board-skeleton-metrics">${Array.from({ length: 4 }, () => `<div class="tastesummary">${t()}<b class="skeleton"></b><small class="board-stat-footer">${t("48%")}</small></div>`).join("")}</div><div class="board-skeleton-chart"><div class="board-skeleton-ring skeleton"></div><div>${n().repeat(4)}</div></div><div class="board-skeleton-section">${t("32%")}${n().repeat(5)}</div>`;else if (e === "/follow-manage") r = `<div class="board-skeleton-section">${t("20%")}<div class="skeleton board-skeleton-input"></div>${t("72%")}</div><div class="board-skeleton-row">${t("24%")}${t("40%")}</div><div class="board-skeleton-section">${n().repeat(6)}</div><div class="board-skeleton-row">${t("30%")}${t("30%")}</div>`;@@ -4123,7 +4149,7 @@ function oi(e) {}//#endregion//#region src/catalog-onboarding.ts-var si = [+var ci = ["loc","creator","performer",@@ -4140,16 +4166,16 @@ var si = ["jav","thumb"];-function ci() {+function li() {let e = (e) => Array(64).fill(e).join("");return {tiers: "<div class=\"tier catalog-placeholder\" aria-hidden=\"true\">" + e("<span class=\"av\"><span class=\"ring\"></span><span class=\"nm\"> </span></span>") + "</div><div class=\"tier catalog-placeholder\" aria-hidden=\"true\">" + e("<span class=\"brandpill\"><span class=\"mk\"></span><span class=\"placeholder-name\"> </span></span>") + "</div>",tags: "<span class=\"catalog-placeholder placeholder-tags\" aria-hidden=\"true\">" + e("<span class=\"pill\"> </span>") + "</span>"};}-async function li(e, t) {+async function ui(e, t) {let n = new URLSearchParams();- for (let t of si) e[t] && n.set(t, e[t]);+ for (let t of ci) e[t] && n.set(t, e[t]);let [r, i] = await Promise.all([t("/api/facets?" + n), t("/api/items?" + n + "&limit=5")]), a = [...new Set([...r.creators || [],...r.tagperformers || [],@@ -4160,7 +4186,7 @@ async function li(e, t) {return r.set("q", e), r.set("limit", "1"), (await t("/api/items?" + r)).total > 0 ? e : "";}))).filter(Boolean);}-function ui({ kind: e = "catalog", filtered: t = !1, jav: n = !1, configurable: r = !1, online: i = !1 } = {}) {+function di({ kind: e = "catalog", filtered: t = !1, jav: n = !1, configurable: r = !1, online: i = !1 } = {}) {let a = r ? "<a class=\"geist-button primary\" href=\"/configuration\">添加内容</a>" : "", o = "<a class=\"geist-button\" href=\"/follow-manage\">添加来源</a>";return t || n ? u("search", n ? "还没有符合条件的 JAV 作品" : "没有符合条件的内容", n ? "已扫描但尚未补充发行资料的视频可在全部内容中查看。" : "清除筛选或搜索条件后查看全部内容。", { actions: "<a class=\"geist-button primary\" href=\"/?loc=&thumb=0\">查看全部内容</a>" }) : e === "catalog" ? u("play", "还没有视频", "添加媒体文件夹或关注来源,开始建立你的馆藏。", { actions: a + o }) : u(e === "tags" ? "tags" : "user-round", "还没有" + ({tags: "标签",@@ -4173,7 +4199,7 @@ function ui({ kind: e = "catalog", filtered: t = !1, jav: n = !1, configurable:}//#endregion//#region src/sidebar.ts-function di(e) {+function fi(e) {return ["/","/unseen",@@ -4183,28 +4209,28 @@ function di(e) {"/junk-files"].includes(e) || /^\/(item|mix|parts|editions)\//.test(e) || /^\/playlists\/\d+\/\d+$/.test(e) || /^\/(performers|studios|creators|series|agencies)\/.+/.test(e);}-function fi(e, t) {+function pi(e, t) {return e.dataset.surface === t && e.querySelector(".dnav") ? !1 : (e.dataset.surface = t, e.replaceChildren(), !0);}-function pi(e) {+function mi(e) {let t = /* @__PURE__ */ new Map();for (let n of e) for (let e of new Set(n.tags || [])) t.set(e, (t.get(e) || 0) + 1);return [...t].sort((e, t) => t[1] - e[1]).slice(0, 30);}//#endregion//#region src/resource-sync.ts-var $ = (e = 0) => Number(e).toLocaleString(), mi = {+var $ = (e = 0) => Number(e).toLocaleString(), hi = {local: "本地磁盘",115: "115",pikpak: "PikPak"};-function hi(e, t) {+function gi(e, t) {let n = e.cache || {files: 0,bytes: 0}, r = !!(e.missing || n.files);return `<div class="resourcepanel" data-geist-fieldset><div class="resourcesources">${(e.sources || []).map((e) => `<article>- <div class="resourcesourcetitle"><b>${mi[e.location] || "媒体来源"}</b><span class="${e.online ? "online" : "offline"}">${e.online ? "可访问" : "离线,已跳过"}</span></div>+ <div class="resourcesourcetitle"><b>${hi[e.location] || "媒体来源"}</b><span class="${e.online ? "online" : "offline"}">${e.online ? "可访问" : "离线,已跳过"}</span></div><strong>${e.online ? `${$(e.missing)} 项` : "—"}</strong><small>${e.online ? `找不到文件 · 已检查 ${$(e.checked)} 项` : `馆藏中有 ${$(e.total)} 项`}</small>${e.unreadable ? `<small>${$(e.unreadable)} 项读取失败,已跳过</small>` : ""}</article>`).join("")}</div>@@ -4215,60 +4241,60 @@ function hi(e, t) {}//#endregion//#region src/jav-artwork.ts-function gi(e) {+function _i(e) {return ["small","sleeve","preview"].includes(String(e)) ? "small" : "big";}-function _i(e) {+function vi(e) {return {- javLayout: gi(e.javLayout),- javImage: vi(e.javLayout === "preview" ? "thumbnail" : e.javImage)+ javLayout: _i(e.javLayout),+ javImage: yi(e.javLayout === "preview" ? "thumbnail" : e.javImage)};}-function vi(e) {+function yi(e) {return e === "thumbnail" ? "thumbnail" : "cover";}-function yi(e, t) {- return e.is_jav && e.code && e.has_cover && (vi(t) === "cover" || !e.has_thumb) ? "cover" : e.has_thumb ? "thumbnail" : "";-}function bi(e, t) {+ return e.is_jav && e.code && e.has_cover && (yi(t) === "cover" || !e.has_thumb) ? "cover" : e.has_thumb ? "thumbnail" : "";+}+function xi(e, t) {e.querySelectorAll("img[data-jav-image]").forEach((e) => {- let n = e.dataset.javCover || "", r = e.dataset.javThumb || "", i = !!(n && (vi(t) === "cover" || !r)), a = i ? n : r;+ let n = e.dataset.javCover || "", r = e.dataset.javThumb || "", i = !!(n && (yi(t) === "cover" || !r)), a = i ? n : r;e.classList.toggle("cover", i), e.classList.toggle("whole", i && e.dataset.javImageLayout !== "big"), e.classList.toggle("front", i && e.dataset.javImageLayout === "big"), e.removeAttribute("style"), a && e.getAttribute("src") !== a && (e.src = a);});}//#endregion//#region src/islands.ts-var xi = {+var Si = {"library-processing": {load: dt,component: ft},scraping: {- load: Rr,- component: Vr+ load: zr,+ component: Hr},"quality-goals": {- load: Fr,- component: Lr+ load: Ir,+ component: Rr},configuration: {- load: zn,- component: Kn+ load: Bn,+ component: qn}-}, Si = () => Object.keys(xi), Ci = /* @__PURE__ */ new Map();-async function wi(e, t, n, r = {}) {- let i = xi[e];+}, Ci = () => Object.keys(Si), wi = /* @__PURE__ */ new Map();+async function Ti(e, t, n, r = {}) {+ let i = Si[e];if (!i) throw Error(`未注册的 island:${String(e)}`);- Ti(t);+ Ei(t);let a = {controller: new AbortController(),painted: !1};- Ci.set(t, a);+ wi.set(t, a);let o;try {o = {@@ -4282,9 +4308,9 @@ async function wi(e, t, n, r = {}) {error: G(e)};}- if (Ci.get(t) !== a) return;+ if (wi.get(t) !== a) return;if (r.isCurrent && !r.isCurrent()) {- Ci.delete(t);+ wi.delete(t);return;}t.textContent = "", a.painted = !0;@@ -4294,9 +4320,9 @@ async function wi(e, t, n, r = {}) {};Oe(ae(i.component, s), t);}-function Ti(e) {- let t = Ci.get(e);- t && (t.controller.abort(), Ci.delete(e), t.painted && Oe(null, e));+function Ei(e) {+ let t = wi.get(e);+ t && (t.controller.abort(), wi.delete(e), t.painted && Oe(null, e));}//#endregion-export { _t as TASTE_GUIDE_KEY, hn as activityChartsHtml, oi as boardPageSkeleton, je as boundedPreference, ui as catalogEmptyHtml, li as catalogSuggestions, ht as cleanupSkeletonHtml, pt as cloudLocations, mt as cloudPreferenceLocations, Yr as createReviewSelection, ln as creatorSankeyHtml, Ie as distributionChart, ci as emptyCatalogLayout, ai as entitySkeletonHtml, lt as followJobProgress, qr as identityEvidenceHtml, Ct as initBoardControls, Si as islandNames, yi as javImageKind, Fe as jobProgressHtml, ri as matchesFaceSource, xt as mountBoardStatePreview, wi as mountIsland, Ne as mountNumberSetting, ii as nativeImageFit, vi as normalizeJavImage, gi as normalizeJavLayout, _i as normalizeJavPreferences, ke as preferredDirection, Re as radarChart, fn as radialCardHtml, Le as rankedChart, Wr as refreshStore, hi as resourceScanHtml, Kr as reviewImageHtml, di as sidebarHasCatalogContent, vn as sidebarSectionHtml, pi as sidebarTagCounts, Pe as statCardBody, Ur as storeNames, St as syncBoardRange, bi as syncJavImages, Me as syncNumberSetting, fi as syncSidebarSurface, gt as tasteHistoryGuideHtml, xn as transitionTheme, Ti as unmountIsland, Xr as updateReviewSticky, ct as watchJob, gn as wireActivityCharts, un as wireCreatorSankey, Ot as wireExpandableRanks, Dt as wireGrowingCharts, pn as wireRadialCards, Jr as wireReviewPictures, ni as wireReviewSelection, yn as wireSidebarGroups, vt as wireTasteHistoryGuide };+export { _t as TASTE_GUIDE_KEY, hn as activityChartsHtml, si as boardPageSkeleton, je as boundedPreference, di as catalogEmptyHtml, ui as catalogSuggestions, ht as cleanupSkeletonHtml, pt as cloudLocations, mt as cloudPreferenceLocations, Xr as createReviewSelection, ln as creatorSankeyHtml, Ie as distributionChart, li as emptyCatalogLayout, oi as entitySkeletonHtml, lt as followJobProgress, Jr as identityEvidenceHtml, Ct as initBoardControls, Ci as islandNames, bi as javImageKind, Fe as jobProgressHtml, ii as matchesFaceSource, xt as mountBoardStatePreview, Ti as mountIsland, Ne as mountNumberSetting, ai as nativeImageFit, yi as normalizeJavImage, _i as normalizeJavLayout, vi as normalizeJavPreferences, ke as preferredDirection, Re as radarChart, fn as radialCardHtml, Le as rankedChart, Gr as refreshStore, gi as resourceScanHtml, qr as reviewImageHtml, fi as sidebarHasCatalogContent, vn as sidebarSectionHtml, mi as sidebarTagCounts, Pe as statCardBody, Wr as storeNames, St as syncBoardRange, xi as syncJavImages, Me as syncNumberSetting, pi as syncSidebarSurface, gt as tasteHistoryGuideHtml, xn as transitionTheme, Ei as unmountIsland, Zr as updateReviewSticky, ct as watchJob, gn as wireActivityCharts, un as wireCreatorSankey, Ot as wireExpandableRanks, Dt as wireGrowingCharts, pn as wireRadialCards, Yr as wireReviewPictures, ri as wireReviewSelection, yn as wireSidebarGroups, vt as wireTasteHistoryGuide };diff --git a/web/index.html b/web/index.htmlindex be63a52fe..e485abb93 100644--- a/web/index.html+++ b/web/index.html@@ -36,6 +36,27 @@Phosphor 2.1.1 regular, MIT: filled glyphs where a stroked icon cannot say it. --><svg aria-hidden="true" width="0" height="0" style="position:absolute;overflow:hidden"><symbol id="i-heart-hand" viewBox="0 0 24 24"><path d="M11 14h2a2 2 0 0 0 0-4h-3c-.6 0-1.1.2-1.4.6L3 16" /><path d="m14.45 13.39 5.05-4.694C20.196 8 21 6.85 21 5.75a2.75 2.75 0 0 0-4.797-1.837.276.276 0 0 1-.406 0A2.75 2.75 0 0 0 11 5.75c0 1.2.802 2.248 1.5 2.946L16 11.95" /><path d="m2 15 6 6" /><path d="m7 20 1.6-1.4c.3-.4.8-.6 1.4-.6h4c1.1 0 2.1-.4 2.8-1.2l4.6-4.4a1 1 0 0 0-2.75-2.91" /></symbol>+<symbol id="i-lollipop" viewBox="0 0 24 24"><circle cx="11" cy="11" r="8" /><path d="m21 21-4.3-4.3" /><path d="M11 11a2 2 0 0 0 4 0 4 4 0 0 0-8 0 6 6 0 0 0 12 0" /></symbol>+<symbol id="i-candy" viewBox="0 0 24 24"><path d="M10 7v10.9" /><path d="M14 6.1V17" /><path d="M16 7V3a1 1 0 0 1 1.707-.707 2.5 2.5 0 0 0 2.152.717 1 1 0 0 1 1.131 1.131 2.5 2.5 0 0 0 .717 2.152A1 1 0 0 1 21 8h-4" /><path d="M16.536 7.465a5 5 0 0 0-7.072 0l-2 2a5 5 0 0 0 0 7.07 5 5 0 0 0 7.072 0l2-2a5 5 0 0 0 0-7.07" /><path d="M8 17v4a1 1 0 0 1-1.707.707 2.5 2.5 0 0 0-2.152-.717 1 1 0 0 1-1.131-1.131 2.5 2.5 0 0 0-.717-2.152A1 1 0 0 1 3 16h4" /></symbol>+<symbol id="i-banana" viewBox="0 0 24 24"><path d="M4 13c3.5-2 8-2 10 2a5.5 5.5 0 0 1 8 5" /><path d="M5.15 17.89c5.52-1.52 8.65-6.89 7-12C11.55 4 11.5 2 13 2c3.22 0 5 5.5 5 8 0 6.5-4.2 12-10.49 12C5.11 22 2 22 2 20c0-1.5 1.14-1.55 3.15-2.11Z" /></symbol>+<symbol id="i-droplets" viewBox="0 0 24 24"><path d="M7 16.3c2.2 0 4-1.83 4-4.05 0-1.16-.57-2.26-1.71-3.19S7.29 6.75 7 5.3c-.29 1.45-1.14 2.84-2.29 3.76S3 11.1 3 12.25c0 2.22 1.8 4.05 4 4.05z" /><path d="M12.56 6.6A10.97 10.97 0 0 0 14 3.02c.5 2.5 2 4.9 4 6.5s3 3.5 3 5.5a6.98 6.98 0 0 1-11.91 4.97" /></symbol>+<symbol id="i-venus" viewBox="0 0 24 24"><path d="M12 15v7" /><path d="M9 19h6" /><circle cx="12" cy="9" r="6" /></symbol>+<symbol id="i-mars" viewBox="0 0 24 24"><path d="M16 3h5v5" /><path d="m21 3-6.75 6.75" /><circle cx="10" cy="14" r="6" /></symbol>+<symbol id="i-venus-and-mars" viewBox="0 0 24 24"><path d="M10 20h4" /><path d="M12 16v6" /><path d="M17 2h4v4" /><path d="m21 2-5.46 5.46" /><circle cx="12" cy="11" r="5" /></symbol>+<symbol id="i-ribbon" viewBox="0 0 24 24"><path d="M12 11.22C11 9.997 10 9 10 8a2 2 0 0 1 4 0c0 1-.998 2.002-2.01 3.22" /><path d="m12 18 2.57-3.5" /><path d="M6.243 9.016a7 7 0 0 1 11.507-.009" /><path d="M9.35 14.53 12 11.22" /><path d="M9.35 14.53C7.728 12.246 6 10.221 6 7a6 5 0 0 1 12 0c-.005 3.22-1.778 5.235-3.43 7.5l3.557 4.527a1 1 0 0 1-.203 1.43l-1.894 1.36a1 1 0 0 1-1.384-.215L12 18l-2.679 3.593a1 1 0 0 1-1.39.213l-1.865-1.353a1 1 0 0 1-.203-1.422z" /></symbol>+<symbol id="i-graduation-cap" viewBox="0 0 24 24"><path d="M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z" /><path d="M22 10v6" /><path d="M6 12.5V16a6 3 0 0 0 12 0v-3.5" /></symbol>+<symbol id="i-stethoscope" viewBox="0 0 24 24"><path d="M11 2v2" /><path d="M5 2v2" /><path d="M5 3H4a2 2 0 0 0-2 2v4a6 6 0 0 0 12 0V5a2 2 0 0 0-2-2h-1" /><path d="M8 15a6 6 0 0 0 12 0v-3" /><circle cx="20" cy="10" r="2" /></symbol>+<symbol id="i-glasses" viewBox="0 0 24 24"><circle cx="6" cy="15" r="4" /><circle cx="18" cy="15" r="4" /><path d="M14 15a2 2 0 0 0-2-2 2 2 0 0 0-2 2" /><path d="M2.5 13 5 7c.7-1.3 1.4-2 3-2" /><path d="M21.5 13 19 7c-.7-1.3-1.5-2-3-2" /></symbol>+<symbol id="i-rabbit" viewBox="0 0 24 24"><path d="M13 16a3 3 0 0 1 2.24 5" /><path d="M18 12h.01" /><path d="M18 21h-8a4 4 0 0 1-4-4 7 7 0 0 1 7-7h.2L9.6 6.4a1 1 0 1 1 2.8-2.8L15.8 7h.2c3.3 0 6 2.7 6 6v1a2 2 0 0 1-2 2h-1a3 3 0 0 0-3 3" /><path d="M20 8.54V4a2 2 0 1 0-4 0v3" /><path d="M7.612 12.524a3 3 0 1 0-1.6 4.3" /></symbol>+<symbol id="i-paw-print" viewBox="0 0 24 24"><circle cx="11" cy="4" r="2" /><circle cx="18" cy="8" r="2" /><circle cx="20" cy="16" r="2" /><path d="M9 10a5 5 0 0 1 5 5v3.5a3.5 3.5 0 0 1-6.84 1.045Q6.52 17.48 4.46 16.84A3.5 3.5 0 0 1 5.5 10Z" /></symbol>+<symbol id="i-dumbbell" viewBox="0 0 24 24"><path d="M17.596 12.768a2 2 0 1 0 2.829-2.829l-1.768-1.767a2 2 0 0 0 2.828-2.829l-2.828-2.828a2 2 0 0 0-2.829 2.828l-1.767-1.768a2 2 0 1 0-2.829 2.829z" /><path d="m2.5 21.5 1.4-1.4" /><path d="m20.1 3.9 1.4-1.4" /><path d="M5.343 21.485a2 2 0 1 0 2.829-2.828l1.767 1.768a2 2 0 1 0 2.829-2.829l-6.364-6.364a2 2 0 1 0-2.829 2.829l1.768 1.767a2 2 0 0 0-2.828 2.829z" /><path d="m9.6 14.4 4.8-4.8" /></symbol>+<symbol id="i-bath" viewBox="0 0 24 24"><path d="M10 4 8 6" /><path d="M17 19v2" /><path d="M2 12h20" /><path d="M7 19v2" /><path d="M9 5 7.621 3.621A2.121 2.121 0 0 0 4 5v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5" /></symbol>+<symbol id="i-key-round" viewBox="0 0 24 24"><path d="M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z" /><circle cx="16.5" cy="7.5" r=".5" fill="currentColor" /></symbol>+<symbol id="i-wine" viewBox="0 0 24 24"><path d="M8 22h8" /><path d="M7 10h10" /><path d="M12 15v7" /><path d="M12 15a5 5 0 0 0 5-5c0-2-.5-4-2-8H9c-1.5 4-2 6-2 8a5 5 0 0 0 5 5Z" /></symbol>+<symbol id="i-cigarette" viewBox="0 0 24 24"><path d="M17 12H3a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h14" /><path d="M18 8c0-2.5-2-2.5-2-5" /><path d="M21 16a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1" /><path d="M22 8c0-2.5-2-2.5-2-5" /><path d="M7 12v4" /></symbol>+<symbol id="i-film" viewBox="0 0 24 24"><rect width="18" height="18" x="3" y="3" rx="2" /><path d="M7 3v18" /><path d="M3 7.5h4" /><path d="M3 12h18" /><path d="M3 16.5h4" /><path d="M17 3v18" /><path d="M17 7.5h4" /><path d="M17 16.5h4" /></symbol>+<symbol id="i-image" viewBox="0 0 24 24"><rect width="18" height="18" x="3" y="3" rx="2" ry="2" /><circle cx="9" cy="9" r="2" /><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" /></symbol>+<symbol id="i-gamepad-2" viewBox="0 0 24 24"><line x1="6" x2="10" y1="11" y2="11" /><line x1="8" x2="8" y1="9" y2="13" /><line x1="15" x2="15.01" y1="12" y2="12" /><line x1="18" x2="18.01" y1="10" y2="10" /><path d="M17.32 5H6.68a4 4 0 0 0-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 0 1 9.828 16h4.344a2 2 0 0 1 1.414.586L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.545-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0 0 17.32 5z" /></symbol><symbol id="i-flame" viewBox="0 0 24 24"><path d="M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4" /></symbol><symbol id="i-cherry" viewBox="0 0 24 24"><path d="M2 17a5 5 0 0 0 10 0c0-2.76-2.5-5-5-3-2.5-2-5 .24-5 3Z" /><path d="M12 17a5 5 0 0 0 10 0c0-2.76-2.5-5-5-3-2.5-2-5 .24-5 3Z" /><path d="M7 14c3.22-2.91 4.29-8.75 5-12 1.66 2.38 4.94 9 5 12" /><path d="M22 9c-4.29 0-7.14-2.33-10-7 5.71 0 10 4.67 10 7Z" /></symbol><symbol id="i-gem" viewBox="0 0 24 24"><path d="M10.5 3 8 9l4 13 4-13-2.5-6" /><path d="M17 3a2 2 0 0 1 1.6.8l3 4a2 2 0 0 1 .013 2.382l-7.99 10.986a2 2 0 0 1-3.247 0l-7.99-10.986A2 2 0 0 1 2.4 7.8l2.998-3.997A2 2 0 0 1 7 3z" /><path d="M2 9h20" /></symbol>diff --git a/web/js/ui-components.js b/web/js/ui-components.jsindex 498664ebf..3741e07d3 100644--- a/web/js/ui-components.js+++ b/web/js/ui-components.js@@ -319,8 +319,11 @@ const OVERLAY_SCROLLERS=['.settingsscroll','.sidecontent','.tagpickbody','.mixlist','.playlistpicklist','.playerstats','.vjs-peach-settings-menu','.geist-scroller-container','.metricstrip','.tastesummaries','.insighttabs','.insightstorage','.skeletondashstrip','.followpagination','.linktablewrap',- '.reviewtabs','.junkfilters',+ '.reviewtabs','.junkfilters','.ftablewrap',].join(',');+/* Board 层里会超宽的横向滚动层:两端按滚动位置渐隐说明「那边还有」,鼠标停在上面时竖向+ 滚轮转成横向。边线留给外层框,渐隐只落在这一层。 */+const BOARD_EDGE_SCROLLERS='.reviewtabs,.ftablewrap';/*** 覆盖式滚动条:滑块浮在内容上,一列宽度都不占。@@ -434,7 +437,7 @@ export function attachOverlayScrollbar(container,{variant=''}={}){export function wireOverlayScrollbars(root=document){root.querySelectorAll(OVERLAY_SCROLLERS).forEach(el=>{if(deferReviewScroller(el))return;- if(el.matches('.reviewtabs')&&localStorage.getItem('peach.legacy-ui')!=='true'){+ if(el.matches(BOARD_EDGE_SCROLLERS)&&localStorage.getItem('peach.legacy-ui')!=='true'){const edges=()=>{el.dataset.overflowLeft=String(el.scrollLeft>1);el.dataset.overflowRight=String(el.scrollLeft+el.clientWidth<el.scrollWidth-1)};if(!el.dataset.boardScroll){el.dataset.boardScroll='true';el.addEventListener('scroll',edges,{passive:true});el.addEventListener('wheel',event=>{if(Math.abs(event.deltaY)>Math.abs(event.deltaX)&&el.scrollWidth>el.clientWidth){const before=el.scrollLeft;el.scrollLeft+=event.deltaY;if(before!==el.scrollLeft)event.preventDefault()}},{passive:false});new ResizeObserver(edges).observe(el)}edges();return;diff --git a/web/vendor/lucide-ORIGIN.md b/web/vendor/lucide-ORIGIN.mdindex 22952ecc8..26798f546 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` 内联的 92 个 symbol+- 消费者:`web/index.html` 内联的 113 个 symbol雪碧图里另有 7 枚自绘 symbol(shuffle、alert、pics、jav、theater-enter、theater-exit、brand-x)与 16 枚 player-* 前缀的播放器图标,都没有上游可对。RSS 与拖动点保留填充修正,避免小圆点在全局描边样式下消失。