Peach: Local-first video metadata scraper and media manager.
fix(web): 展开、管理、配置三处各拿回自己的字形
longmeidao9a867a93136d
diff --git a/scripts/vendor_web_dependencies.mjs b/scripts/vendor_web_dependencies.mjsindex 6cf50cb1c..0d76b0f73 100644--- a/scripts/vendor_web_dependencies.mjs+++ b/scripts/vendor_web_dependencies.mjs@@ -62,7 +62,7 @@ copyPackageFiles({const lucideIcons = new Map([["clapperboard", "clapperboard"], ["briefcase", "briefcase"],- ["home", "home"], ["sliders-horizontal", "sliders-horizontal"], ["search", "search"],+ ["home", "home"], ["panel-left", "panel-left"], ["search", "search"],["layout-grid", "layout-grid"], ["square-check-big", "square-check-big"],["refresh-cw", "refresh-cw"], ["user-round", "user-round"], ["tags", "tags"],["list-filter", "list-filter"], ["chart", "chart-no-axes-column"],@@ -85,8 +85,10 @@ const lucideIcons = new Map([// 名字和上游对不上的只有排序键:Peach 叫 `sort`,Lucide 叫 `sort-desc`。["sort", "sort-desc"], ["arrow-up", "arrow-up"], ["arrow-down", "arrow-down"],["calendar", "calendar"], ["download", "download"], ["monitor", "monitor"],- // 管理菜单里的「配置」:这台电脑。`monitor` 已经归详情页的分辨率,不能兼任。- ["computer", "computer"],+ // 侧栏「管理」那一层:收拾库里的东西。`settings` 只归右上角的界面偏好。+ ["wrench", "wrench"],+ // 管理菜单里的「配置」:这台电脑的媒体文件夹与端口。+ ["folder-cog", "folder-cog"],// 配置页每行文件夹的「选择文件夹」:弹系统对话框去挑。`folder-open` 归「打开位置」,不兼任。["folder-search", "folder-search"],["ratio", "ratio"], ["sun", "sun"], ["moon", "moon"],diff --git a/tests/test_web_ui.py b/tests/test_web_ui.pyindex 93f168043..681b88a95 100644--- a/tests/test_web_ui.py+++ b/tests/test_web_ui.py@@ -1180,7 +1180,8 @@ class WebUiSourceTests(unittest.TestCase):def test_global_navigation_and_controls_have_accessible_context(self):self.assertPageContains('<a class="skiplink" href="#main">跳到正文</a>')self.assertPageContains('<main id="main" tabindex="-1">')- self.assertPageContains('id="filterBtn" title="筛选" aria-label="筛选"')+ self.assertPageContains(+ 'id="filterBtn" title="导航与筛选" aria-label="展开导航与筛选"')self.assertPageContains('id="settingsBtn" title="设置" aria-label="打开设置"')self.assertPageContains('name="q" type="search"')self.assertPageContains('aria-label="搜索作品、女优、厂牌或标签"')@@ -3476,7 +3477,7 @@ class WebUiSourceTests(unittest.TestCase):它们合并到「管理」下的二级导航;URL 保持原样,只是多了一条共用导航条。"""- self.assertPageContains("['manage','管理','database']")+ self.assertPageContains("['manage','管理','wrench']")self.assertPageContains("const MANAGE_SECTIONS=[")for section in ("'stats','统计'", "'cleanup','数据管理'","'quality','高清版'", "'trash','回收站'", "'review','人工复核'",@@ -3519,7 +3520,7 @@ class WebUiSourceTests(unittest.TestCase):服务端在 `/healthz` 里按调用方回 `configurable`;菜单第一次画时问一次,答复回来再补上这一项。它也不进可钉到侧栏的候选:侧栏顺序跨机同步,钉在手机上就是死链接。"""- self.assertPageContains("['configuration','配置','computer'],")+ self.assertPageContains("['configuration','配置','folder-cog'],")self.assertPageContains("let runtimeConfigurable=null;")self.assertPageContains(" bar.hidden=!current;\n probeConfigurable();")self.assertPageContains("api('/healthz').then(runtime=>{")@@ -6358,9 +6359,17 @@ class WebUiSourceTests(unittest.TestCase):self.assertPageContains("['flagged','已标记','bookmark'],")self.assertPageContains("['immerse','沉浸模式','gallery-vertical-end'],")self.assertPageContains("<span>进入沉浸模式</span>")- # 管理菜单的「配置」是这台电脑:`monitor` 已归详情页的分辨率,`settings` 归设置弹层。- self.assertPageContains("['configuration','配置','computer'],")- self.assertPageContains('<symbol id="i-computer" viewBox="0 0 24 24">')+ # 三个名字里都带「管」「设」的入口各归各的:左上角那枚开的是左栏,所以是一块+ # 被划出侧栏的面板;侧栏「管理」是收拾库里的东西,所以是扳手——圆柱只留给口味页+ # 那几处「数据源」;管理里的「配置」配的是这台电脑的媒体文件夹与端口,所以是+ # 一个待配置的文件夹。齿轮只剩右上角的界面偏好。+ self.assertPageContains(+ 'id="filterBtn" title="导航与筛选" aria-label="展开导航与筛选"')+ self.assertPageContains('<use href="#i-panel-left"/>')+ self.assertPageContains("['manage','管理','wrench'],")+ self.assertPageContains('<symbol id="i-wrench" viewBox="0 0 24 24">')+ self.assertPageContains("['configuration','配置','folder-cog'],")+ self.assertPageContains('<symbol id="i-folder-cog" viewBox="0 0 24 24">')# 配置页每行文件夹的「选择文件夹」弹系统对话框去挑:`folder-search`。`folder-open` 归「打开位置」。self.assertPageContains('<symbol id="i-folder-search" viewBox="0 0 24 24">')self.assertIn('href="#i-folder-search"', (Path(__file__).resolve().parents[1] / "frontend" / "src" / "islands" / "configuration.tsx")@@ -6377,7 +6386,8 @@ class WebUiSourceTests(unittest.TestCase):# 名下带人的事务所在同一个开关的另一半,走公文包。self.assertPageContains("['studios','厂商','clapperboard'],")self.assertPageContains('<symbol id="i-clapperboard" viewBox="0 0 24 24">')- for gone in ("i-monitor-cog", "i-volume-2", "i-sun-moon", "i-building"):+ for gone in ("i-monitor-cog", "i-volume-2", "i-sun-moon", "i-building",+ "i-sliders-horizontal", "i-computer"):self.assertPageLacks(f'<symbol id="{gone}"')self.assertPageContains("${icon('star')}</button>")self.assertPageContains('<symbol id="i-clock" viewBox="0 0 24 24">')diff --git a/web/app.js b/web/app.jsindex 9ac581fd8..8155d0d56 100644--- a/web/app.js+++ b/web/app.js@@ -6446,7 +6446,10 @@ const EDGE_ICONS=[['playlists','播放列表','playlist'],['follow','关注','rss'],['immerse','沉浸模式','gallery-vertical-end'],- ['manage','管理','database'],+ /* 扳手=收拾库里的东西(数据管理、回收站、人工复核、高清版都在这一层)。+ 圆柱只说「数据源」那一件事,归口味页那几处;齿轮只说「我的界面偏好」,+ 归右上角。三个名字都带「管」「设」的字,字形就得把它们分开。 */+ ['manage','管理','wrench'],];/* 每个管理页的身份(标题、图标、可直达的 URL)。用户仍可在设置里把其中任何一个加到顶层侧栏,所以这里保留全部页面,不因为它进了数据管理就删掉。 */@@ -6460,8 +6463,8 @@ const MANAGE_SECTIONS=[// `/follow`。两处都叫「关注」时,管理菜单和页标题都在说一个它去不到的地方。['follow','关注管理','rss'],['quality','高清版','sparkles'],- // 这台电脑的媒体文件夹与端口,字形是一台电脑;`settings` 归右上角的设置弹层。- ['configuration','配置','computer'],+ // 这台电脑的媒体文件夹与端口,字形是一个待配置的文件夹;`settings` 归右上角的设置弹层。+ ['configuration','配置','folder-cog'],];/* 管理菜单只留五项。人工复核、回收站、高清版都是「收拾库里已有的东西」,和垃圾文件、重复文件、空文件夹是同一件事的不同步骤,统一从数据管理进;diff --git a/web/index.html b/web/index.htmlindex 370276c41..98863a8c3 100644--- a/web/index.html+++ b/web/index.html@@ -31,7 +31,7 @@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-home" viewBox="0 0 24 24"><path d="M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8" /><path d="M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" /></symbol>- <symbol id="i-sliders-horizontal" viewBox="0 0 24 24"><path d="M10 5H3" /><path d="M12 19H3" /><path d="M14 3v4" /><path d="M16 17v4" /><path d="M21 12h-9" /><path d="M21 19h-5" /><path d="M21 5h-7" /><path d="M8 10v4" /><path d="M8 12H3" /></symbol>+ <symbol id="i-panel-left" viewBox="0 0 24 24"><rect width="18" height="18" x="3" y="3" rx="2" /><path d="M9 3v18" /></symbol><symbol id="i-search" viewBox="0 0 24 24"><path d="m21 21-4.34-4.34" /><circle cx="11" cy="11" r="8" /></symbol><symbol id="i-layout-grid" viewBox="0 0 24 24"><rect width="7" height="7" x="3" y="3" rx="1" /><rect width="7" height="7" x="14" y="3" rx="1" /><rect width="7" height="7" x="14" y="14" rx="1" /><rect width="7" height="7" x="3" y="14" rx="1" /></symbol><!-- Beeg PicsIcon,取自 2026-08-30 锁定的 main.9442c3b8.js(module 83646)。 -->@@ -50,7 +50,7 @@<symbol id="i-arrow-up" viewBox="0 0 24 24"><path d="m5 12 7-7 7 7" /><path d="M12 19V5" /></symbol><symbol id="i-chart" viewBox="0 0 24 24"><path d="M5 21v-6" /><path d="M12 21V3" /><path d="M19 21V9" /></symbol><symbol id="i-settings" viewBox="0 0 24 24"><path d="M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915" /><circle cx="12" cy="12" r="3" /></symbol>- <symbol id="i-monitor" viewBox="0 0 24 24"><rect width="20" height="14" x="2" y="3" rx="2" /><line x1="8" x2="16" y1="21" y2="21" /><line x1="12" x2="12" y1="17" y2="21" /></symbol><symbol id="i-computer" viewBox="0 0 24 24"><rect width="14" height="8" x="5" y="2" rx="2" /><rect width="20" height="8" x="2" y="14" rx="2" /><path d="M6 18h2" /><path d="M12 18h6" /></symbol><symbol id="i-folder-search" viewBox="0 0 24 24"><path d="M10.7 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v4.1" /><path d="m21 21-1.9-1.9" /><circle cx="17" cy="17" r="3" /></symbol>+ <symbol id="i-monitor" viewBox="0 0 24 24"><rect width="20" height="14" x="2" y="3" rx="2" /><line x1="8" x2="16" y1="21" y2="21" /><line x1="12" x2="12" y1="17" y2="21" /></symbol><symbol id="i-wrench" viewBox="0 0 24 24"><path d="M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z" /></symbol><symbol id="i-folder-search" viewBox="0 0 24 24"><path d="M10.7 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v4.1" /><path d="m21 21-1.9-1.9" /><circle cx="17" cy="17" r="3" /></symbol><symbol id="i-folder-cog" viewBox="0 0 24 24"><path d="M10.3 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.98a2 2 0 0 1 1.69.9l.66 1.2A2 2 0 0 0 12 6h8a2 2 0 0 1 2 2v3.3" /><path d="m14.305 19.53.923-.382" /><path d="m15.228 16.852-.923-.383" /><path d="m16.852 15.228-.383-.923" /><path d="m16.852 20.772-.383.924" /><path d="m19.148 15.228.383-.923" /><path d="m19.53 21.696-.382-.924" /><path d="m20.772 16.852.924-.383" /><path d="m20.772 19.148.924.383" /><circle cx="18" cy="18" r="3" /></symbol><symbol id="i-ratio" viewBox="0 0 24 24"><rect width="12" height="20" x="6" y="2" rx="2" /><rect width="20" height="12" x="2" y="6" rx="2" /></symbol><symbol id="i-sun" viewBox="0 0 24 24"><circle cx="12" cy="12" r="4" /><path d="M12 2v2" /><path d="M12 20v2" /><path d="m4.93 4.93 1.41 1.41" /><path d="m17.66 17.66 1.41 1.41" /><path d="M2 12h2" /><path d="M20 12h2" /><path d="m6.34 17.66-1.41 1.41" /><path d="m19.07 4.93-1.41 1.41" /></symbol><symbol id="i-moon" viewBox="0 0 24 24"><path d="M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401" /></symbol>@@ -130,7 +130,7 @@</svg><header class="top">- <button class="ib" id="filterBtn" title="筛选" aria-label="筛选"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="#i-sliders-horizontal"/></svg></button>+ <button class="ib" id="filterBtn" title="导航与筛选" aria-label="展开导航与筛选"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="#i-panel-left"/></svg></button><a class="brand" href="#" id="brandHome"><img class="mark" src="/peach-logo.png" alt=""><h1 class="disp">Peach</h1><span class="sub mono">蜜桃</span></a><button class="ib searchback" id="searchBack" title="退出搜索" aria-label="退出搜索"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="#i-chevron-left"/></svg></button><div class="search"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="#i-search"/></svg>