Skip to content

armgit / peach

Public Imported from GitHub
0

Peach: Local-first video metadata scraper and media manager.

Merge branch 'master' into agent/claude/config-island

longmeidaoa88b05250df7
diff --cc scripts/vendor_web_dependencies.mjs
index 63a515ba0,44fb03ed0..bffe4ed3f
--- a/scripts/vendor_web_dependencies.mjs
+++ b/scripts/vendor_web_dependencies.mjs
@@@ -85,10 -85,7 +85,11 @@@ 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"],
+ // 配置页每行文件夹的「选择文件夹」:弹系统对话框去挑。`folder-open` 归「打开位置」,不兼任。
+ ["folder-search", "folder-search"],
+ ["ratio", "ratio"], ["sun", "sun"], ["moon", "moon"],
]);
// 自绘 symbol:没有上游可对,所以在这里逐个点名。下面那道分区检查要求雪碧图里
diff --cc tests/test_web_ui.py
index 845da56cb,52776e430..cb4c332d5
--- a/tests/test_web_ui.py
+++ b/tests/test_web_ui.py
@@@ -5536,16 -5928,14 +5967,22 @@@ class WebUiSourceTests(unittest.TestCas
self.assertPageContains("['flagged','已标记','bookmark'],")
self.assertPageContains("['immerse','沉浸模式','gallery-vertical-end'],")
self.assertPageContains("<span>进入沉浸模式</span>")
+ self.assertPageContains("class=\"shorts-enter\" type=\"button\">${icon('play')}")
+ # 管理菜单的「配置」是这台电脑:`monitor` 已归详情页的分辨率,`settings` 归设置弹层。
+ self.assertPageContains("['configuration','配置','computer'],")
+ self.assertPageContains('<symbol id="i-computer" 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")
+ .read_text(encoding="utf-8"))
+ # 主题三档各归各的:太阳是浅色、月亮是深色;跟随系统那档说的是「照这台设备走」,
+ # 讲的是设备不是明暗,所以跟 vercel.com 后台一样用显示器。画面尺寸量的是画幅本身,
+ # 归 `ratio`。
+ self.assertPageContains(
+ "[['system','跟随系统','monitor'],['light','浅色','sun'],['dark','深色','moon']]")
+ self.assertPageContains("${icon('ratio')}<span>${it.width||'?'}×${it.height||'?'}</span>")
# 换下来的三枚没有别的使用者,雪碧图里也不留。
- for gone in ("i-monitor-cog", "i-star", "i-volume-2"):
+ for gone in ("i-monitor-cog", "i-star", "i-volume-2", "i-sun-moon"):
self.assertPageLacks(f'<symbol id="{gone}"')
self.assertPageContains('<symbol id="i-clock" viewBox="0 0 24 24">')
diff --cc web/index.html
index 22589f4a0,9b2113d96..cffeb7425
--- a/web/index.html
+++ b/web/index.html
@@@ -36,7 -50,10 +50,10 @@@
<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-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-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>
<symbol id="i-gauge" viewBox="0 0 24 24"><path d="m12 14 4-4" /><path d="M3.34 19a10 10 0 1 1 17.32 0" /></symbol>
<symbol id="i-theater-enter" viewBox="0 0 24 24"><rect x="2" y="3" width="20" height="18" rx="1.5"/><path d="M2 16h20M8.5 7 5.5 10l3 3M15.5 7l3 3-3 3"/></symbol>
<symbol id="i-theater-exit" viewBox="0 0 24 24"><rect x="2" y="3" width="20" height="18" rx="1.5"/><path d="M2 16h20M5.5 7l3 3-3 3M18.5 7l-3 3 3 3"/></symbol>
@@@ -186,10 -198,11 +198,11 @@@
<div class="settingscard">
<div class="settingshead"><h2 id="settingsTitle">设置</h2><button id="settingsClose" aria-label="关闭设置"><svg viewBox="0 0 24 24"><use href="#i-x"/></svg></button></div>
<div class="settingsscroll">
- <section class="settinggroup"><h3>这台电脑</h3><a class="settingrow" href="/configuration">媒体文件夹与服务配置</a></section>
++
<section class="settinggroup"><h3>浏览</h3>
- <label class="settingrow"><span><b>每批作品</b><small>首页每次加载的作品数量。</small></span><select id="batchSizeSetting"><option value="30">30 个</option><option value="60">60 个</option><option value="90">90 个</option></select></label>
- <label class="settingrow"><span><b>默认排序</b><small>打开首页时使用的排序。</small></span><select id="defaultSortSetting"><option value="seed">随机</option><option value="rating">评分</option><option value="o">高潮计数</option><option value="plays">观看次数</option><option value="dur">时长</option><option value="size">体积</option><option value="new">入库时间</option><option value="played">观看时间</option></select></label>
- <label class="settingrow"><span><b>悬停放大</b><small>转圈完成后进入放大预览。</small></span><select id="hoverDelaySetting"><option value="3">3 秒</option><option value="5">5 秒</option><option value="8">8 秒</option></select></label>
+ <div class="settingrow"><span><b>每批作品</b><small>首页每次加载的作品数量。</small></span><div id="batchSizeSetting"></div></div>
+ <div class="settingrow"><span><b>默认排序</b><small>打开首页时使用的排序。</small></span><div id="defaultSortSetting"></div></div>
+ <div class="settingrow"><span><b>悬停放大</b><small>转圈完成后进入放大预览。</small></span><div id="hoverDelaySetting"></div></div>
<label class="settingrow"><span><b>合并分卷与版本</b><small>同一番号的多个分卷或版次只占一张卡,展示第一个。</small></span><span class="pcheck"><input type="checkbox" id="groupCollapseSetting"><span aria-hidden="true"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="#i-check"/></svg></span></span></label>
</section>
<section class="settinggroup"><h3>播放</h3>
diff --cc web/vendor/lucide-ORIGIN.md
index 78aeca32b,653f715af..998396d15
--- a/web/vendor/lucide-ORIGIN.md
+++ b/web/vendor/lucide-ORIGIN.md
@@@ -3,7 -3,7 +3,7 @@@
- npm 包:`[email protected]`
- npm lock integrity:`sha512-/pRaHJceXrQyAMzWfwhWPMwZeiZEIejZ+Ko226AqI52QbLVgowyGAp7OzZIaQEf7XB+LuRGWqUGqTfu3LJ0CQQ==`
- 许可证:ISC;原文见 `lucide-LICENSE.txt`
- - 消费者:`web/index.html` 内联的 60 个 symbol
-- 消费者:`web/index.html` 内联的 61 个 symbol
++- 消费者:`web/index.html` 内联的 63 个 symbol
雪碧图里另有 6 枚自绘 symbol(alert、pics、jav、theater-enter、theater-exit、brand-x)与 16 枚 player-* 前缀的播放器图标,都没有上游可对。
RSS 与拖动点保留填充修正,避免小圆点在全局描边样式下消失。