Peach: Local-first video metadata scraper and media manager.
fix(web): 未看范围走 Geist Select
longmeidaoe90115fbef35
diff --git a/web/app.js b/web/app.jsindex f227fbc12..c5c3ca6a7 100644--- a/web/app.js+++ b/web/app.js@@ -66,6 +66,10 @@ const FOLLOW_SORT_DEFAULT_DIR={checked:'desc',added:'desc',name:'asc',sources:'d/* 工具栏下拉与表格表头是同一份维度:前四个按作者分组比,后三个按单条来源比。 */const FOLLOW_SORT_OPTIONS=[['checked','检查时间'],['added','添加时间'],['name','作者名称'],['sources','来源数量'],['source','来源名称'],['provider','站点'],['status','状态']];+/* 值是天数,`0` 表示不限。选项文本自己说清量的是时间:这一行不挂文字标签,收起时+ 框里只剩当前这一项,「全部」放在时钟图标旁边读不出是全部什么。 */+const FOLLOW_UNREAD_RANGE_OPTIONS=[['0','不限时间'],['7','最近 7 天'],['30','最近 30 天'],+ ['90','最近 90 天']];/* 同 `sortButtonHtml`:这枚键的无障碍名称说的是点下去会得到什么,所以取反方向的词。 */const followSortLabel=()=>`按${FOLLOW_SORT_LABELS[followManageSort]||'关注列表'}${(FOLLOW_SORT_DIR_WORDS[followManageSort]||[])[followManageDir==='asc'?0:1]||''}排序`;@@ -5838,7 +5842,8 @@ function renderFollowManage(credentials){</section><section class="fsec" data-follow-workspace-panel="list"><div class="fsechead"><h3>关注列表</h3>- <label class="funreadrange">未看范围<select aria-label="未看范围" data-follow-unread-days><option value="0"${appSettings.unreadDays===0?' selected':''}>全部</option><option value="7"${appSettings.unreadDays===7?' selected':''}>最近 7 天</option><option value="30"${appSettings.unreadDays===30?' selected':''}>最近 30 天</option><option value="90"${appSettings.unreadDays===90?' selected':''}>最近 90 天</option></select></label>+ <span class="funreadrange">${icon('clock')}${selectFieldHtml(FOLLOW_UNREAD_RANGE_OPTIONS,+ String(appSettings.unreadDays),{label:'未看范围',attr:'data-follow-unread-days'})}</span><span class="fmeta">${sources.length} 个来源${counts.new?` · <b>${counts.new}</b> 条未看`:''}</span><span class="fmanagesort">${icon('sort')}${selectFieldHtml(FOLLOW_SORT_OPTIONS,followManageSort,@@ -5950,7 +5955,9 @@ function wireFollowItems(){function wireFollowManage(creds=[]){void wireResolveProgress();const root=$('#stats'),form=root.querySelector('#followAdd');- root.querySelector('[data-follow-unread-days]')?.addEventListener('change',event=>{appSettings.unreadDays=+event.target.value||0;saveSettings();openFollowManage(false)});+ const unreadRange=root.querySelector('[data-follow-unread-days]');+ if(unreadRange)wireSelectField(unreadRange).addEventListener('change',()=>{+ appSettings.unreadDays=+unreadRange.value||0;saveSettings();openFollowManage(false)});wireCollapse(root,'details.fauthor','follow-author-collapse','[data-follow-author-toggle]');root.querySelectorAll('[data-follow-author-toggle]').forEach(button=>button.onclick=event=>{event.stopPropagation();diff --git a/web/css/22-followmanage.css b/web/css/22-followmanage.cssindex 66a243787..c5217f8d2 100644--- a/web/css/22-followmanage.css+++ b/web/css/22-followmanage.css@@ -34,6 +34,7 @@缩放根本轮不到发生。基准 0 让它先占 0 再吃剩下的宽度,末尾省略。 */.fsechead .fmeta{flex:1 1 0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fsechead .fbtn,.fsechead .fmanagesort{flex:none}+.fsechead .funreadrange{flex:none}/* 升降序键是这一行里唯一的纯图标键:正方形、边长取 --control-h,和同排的下拉、版式开关一样高,图标 16px 与排序框左侧那枚同尺寸。写成两级选择器是因为 .fbtn 的`padding:0 12px` 排在本文件后面——单类名压不过它,内容宽只剩 8px,图标会被压成一条。 */@@ -45,6 +46,11 @@.fmanagesort{position:relative;display:inline-flex;align-items:center;color:var(--muted);font-size:var(--fs-xs)}.fmanagesort>svg{position:absolute;z-index:1;left:9px;width:16px;height:16px;stroke:currentColor;fill:none;pointer-events:none}.fmanagesort:hover>svg{color:var(--ink-2)}+/* 未看范围照排序框的同一套:框内前缀图标,框外不挂文字。 */+.funreadrange{position:relative;display:inline-flex;align-items:center;color:var(--muted);font-size:var(--fs-xs)}+.funreadrange>svg{position:absolute;z-index:1;left:9px;width:16px;height:16px;stroke:currentColor;fill:none;pointer-events:none}+.funreadrange:hover>svg{color:var(--ink-2)}+.funreadrange .gselectfield{height:var(--control-h);padding:0 12px 0 33px;color:var(--ink-2)}/* 版式开关和排序框、按钮同处分区标题行,一起收到 --control-h 上(内边距 2px + 1px 边框凑齐同一个外高)。这一行不给自己开小一号的档:同排三个控件里只有下拉缩了尺寸和字号,读起来就是一个点不动的说明标签,而它恰恰是这行里唯一能改变列表内容的控件。 */