Skip to content

armgit / peach

Public Imported from GitHub
0

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

fix: 对齐代理配置文字链接样式

longmeidaoaee6424bf57e
diff --git a/docs/reference-snapshots/geist-settings.md b/docs/reference-snapshots/geist-settings.md
index ee3115c49..18993b233 100644
--- a/docs/reference-snapshots/geist-settings.md
+++ b/docs/reference-snapshots/geist-settings.md
@@ -47,6 +47,8 @@
## 管理页面间距审查
+站内文字链接参考本页 Fieldset 的 `View documentation` 示例:`text-[var(--geist-link-color)]`、`hover:underline`、`focus-visible:outline-2` 与 `outline-offset-4`。Peach 使用主题链接色、悬停下划线及 2px 焦点轮廓,访问后颜色保持一致;“配置 Peach 代理”跳转 `/configuration#peachProxy`,不附外链箭头。独立 `/geist/link` 页面未取得,证据来自官方 Fieldset 示例及本页已登记 HTML。
+
2026-09-06 再次通过 HTTPX 获取官方 Fieldset、Input、Description、Note 的 HTML/CSS。Fieldset 与共同 CSS 的 SHA-256 与本页首表一致;Input 为 `df3a8b7ba933798842915d06056ef079878faa091af6b8d67e61d69cc0a08962`,Description 为 `7a16d502b3fdba316ef740057b275d2acdeb85f79d4944201331af906d9b497f`。浏览器参考页返回 `js execution timed out`,实时参考布局未取得。
Fieldset 正文 `p-5` 为 20px;副标题 `pt-2` 为 8px,`pb-5` 为 20px;副标题是最后一个孩子时正文取消底内边距,避免两份留白相加。Footer 使用 `pt-3 pr-3 pb-3 pl-5`,即上、右、下 12px,左 20px。Label 使用 8px 的 `mb-2`。这些是具体组件值,不是所有元素一律相隔 8px 的规定。
diff --git a/frontend/src/islands/scraping.tsx b/frontend/src/islands/scraping.tsx
index 827822c94..f8b815b72 100644
--- a/frontend/src/islands/scraping.tsx
+++ b/frontend/src/islands/scraping.tsx
@@ -78,7 +78,7 @@ function SourceForm({ source, toast }: { source: Source } & ScrapingProps) {
<a class="scraping-url" href={source.login} target="_blank" rel="noopener noreferrer">{source.login}</a>
</div>
<div class="scraping-label">连接方式<NetworkSelect value={network} onChange={setNetwork} /></div>
- {network === 'peach' && <a href="/configuration#peachProxy">配置 Peach 代理</a>}
+ {network === 'peach' && <a class="geist-text-link" href="/configuration#peachProxy">配置 Peach 代理</a>}
{source.accepts_cookie && <>
<p>{saved.cookie_saved ? 'Cookie 已保存,登录是否有效请在抓取时确认。' : '需要登录时,任选一种方式提供 Cookie。'}</p>
<div class="insightswitch scraping-cookie-method" role="radiogroup" aria-label="提供 Cookie 的方式(二选一)">
diff --git a/frontend/test/scraping.test.tsx b/frontend/test/scraping.test.tsx
index 7df446273..f477d04d0 100644
--- a/frontend/test/scraping.test.tsx
+++ b/frontend/test/scraping.test.tsx
@@ -23,6 +23,10 @@ it('保存后清空秘密输入,状态只表示保存且撤销可操作', asyn
const heading = host.querySelector('.geist-fieldset-heading')!;
expect(heading.querySelector('.geist-fieldset-title')?.textContent).toBe(source.label);
expect(heading.querySelector('a')?.href).toBe(source.login);
+ const proxyLink = host.querySelector<HTMLAnchorElement>('.geist-text-link')!;
+ expect(proxyLink.getAttribute('href')).toBe('/configuration#peachProxy');
+ expect(proxyLink.textContent).toBe('配置 Peach 代理');
+ expect(proxyLink.target).toBe('');
const input = host.querySelector<HTMLInputElement>('input[type=password]')!;
await act(async () => { input.value = 'session=fixture'; input.dispatchEvent(new Event('input', { bubbles: true })); });
await act(async () => {
diff --git a/tests/test_web_ui.py b/tests/test_web_ui.py
index b6906a145..56eb077cf 100644
--- a/tests/test_web_ui.py
+++ b/tests/test_web_ui.py
@@ -352,7 +352,7 @@ class WebUiSourceTests(unittest.TestCase):
".geist-progress", ".watchprogress", ".vjs-play-progress", ".vjs-progress-holder",
".trace .bar", ".tokbar", # 进度与数据
":is(#censorSetting,#detailAutoplaySetting,.ptoggle):checked", # Toggle 开态:Geist Toggle 实测轨道 rgb(0,112,243)
- ".entitylink", ".flink", ".fsourcelink", ".fcred a", ".tokauthor>a", ".confighelp a", ".taste-history-guide-content a", # 真正的链接
+ ".entitylink", ".flink", ".fsourcelink", ".fcred a", ".tokauthor>a", ".confighelp a", ".taste-history-guide-content a", ".geist-text-link", # 真正的链接
)
def test_tungsten_is_reserved_for_focus_links_progress_and_toggle(self):
diff --git a/web/css/04-manage.css b/web/css/04-manage.css
index 50ccaced5..3d3badf38 100644
--- a/web/css/04-manage.css
+++ b/web/css/04-manage.css
@@ -106,6 +106,9 @@
.stats h2{margin:0 0 4px;font-size:var(--fs-2xl)}
.stats .sub{color:var(--muted);margin:0}
/* 采集来源表单复用管理页 Fieldset。 */
+.geist-text-link{color:var(--tungsten);text-decoration:none;justify-self:start}
+.geist-text-link:hover{text-decoration:underline;text-underline-offset:3px}
+.geist-text-link:focus-visible{outline:2px solid var(--tungsten);outline-offset:4px}
.scraping-page{width:min(812px,100%);margin:0 auto;display:grid;gap:20px}
.scraping-page>h1,.scraping-page p{margin:0}
.scraping-fields .scraping-cover-form{display:flex;align-items:center;gap:8px;min-width:0}
diff --git a/web/dist/peach-ui.js b/web/dist/peach-ui.js
index c03ea3246..90b127870 100644
--- a/web/dist/peach-ui.js
+++ b/web/dist/peach-ui.js
@@ -2122,6 +2122,7 @@ function dn({ source: e, toast: t }) {
})]
}),
i === "peach" && /* @__PURE__ */ K("a", {
+ class: "geist-text-link",
href: "/configuration#peachProxy",
children: "配置 Peach 代理"
}),