Skip to content

armgit / peach

Public Imported from GitHub
0

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

fix(copy): 界面文案改成作者口吻

longmeidaoa8f63e1f9689
diff --git a/frontend/e2e/design.test.ts b/frontend/e2e/design.test.ts
index 6d5e5732b..a37722ff0 100644
--- a/frontend/e2e/design.test.ts
+++ b/frontend/e2e/design.test.ts
@@ -274,7 +274,7 @@ describe('设计决定', () => {
it('持久警示是状态色块,不和字段说明共用灰色小字', { timeout: 60_000 }, async () => {
const opened = await openAccess(browser);
try {
- await opened.form.getByText('关闭访问密码,允许能连接到 Peach 的设备直接访问').click({ timeout: 5_000 });
+ await opened.form.getByText('关闭访问密码', { exact: true }).click({ timeout: 5_000 });
const note = opened.form.locator('[role="note"]');
await note.waitFor({ timeout: 5_000 });
const surface = await note.evaluate((element) => getComputedStyle(element).backgroundColor);
diff --git a/frontend/src/react/follow-manage/credentials.tsx b/frontend/src/react/follow-manage/credentials.tsx
index 696bef859..d2266488f 100644
--- a/frontend/src/react/follow-manage/credentials.tsx
+++ b/frontend/src/react/follow-manage/credentials.tsx
@@ -28,7 +28,7 @@ import { RiKey2Line } from '@remixicon/react';
const STORAGE_TITLE = '这些账号信息存在哪里';
const STORAGE_BODY = '存成运行 Peach 那台电脑上的一个文件。在 Windows 上它不额外加锁,能登录那台电脑的人都能打开。';
const CLEAR_BODY = '将清除这个来源在本机和共享副本中的登录凭据。';
-const WORLD_READABLE = '文件权限过宽,请在运行 Peach 的 POSIX 主机上收紧为 0600。';
+const WORLD_READABLE = '文件权限过宽。在运行 Peach 的 POSIX 主机上收紧为 0600。';
/** 一个字段此刻的样子:共享回填的、本机存过的,还是从来没填过。 */
function fieldHint(row: CredentialRow, name: string): string {
diff --git a/frontend/src/react/library-processing/library-processing-card.tsx b/frontend/src/react/library-processing/library-processing-card.tsx
index c63bffd21..d8a0e0542 100644
--- a/frontend/src/react/library-processing/library-processing-card.tsx
+++ b/frontend/src/react/library-processing/library-processing-card.tsx
@@ -48,7 +48,7 @@ const MENU_ROW = cx(MENU_ITEM, MENU_ITEM_INTERACTIVE, 'text-body-2-medium');
/* 中文正文写成常量:JSX 里换行的文字会在接缝处多出一个空格,中文句子里看得见。 */
const CARD_TEXT = '扫描媒体文件夹,导入已有资料,采集缺失信息。两段也可以分开跑:新盘刚接上时先只扫描,'
+ '几万个文件登记完就能用;采集被网络拖住时只重跑采集,不必再扫一遍磁盘。';
-const STALLED_TEXT = '这个项目处理时间较长,暂时没有新进展。可以继续等待,或在任务结束后重试未完成项。';
+const STALLED_TEXT = '这一项耗时较长,暂时没有新进展。任务结束后可以重试未完成的部分。';
/* 补齐女优资料是落库之后的一步,一趟里常常什么都不用补,那时这句话不出现:
四个读数全是 0 还写一句「别名 0 个」,读的人分不清是没得补还是这一步没跑。 */
const profileText = (state: LibraryProcessingData) => {
diff --git a/frontend/src/react/review/review-page.tsx b/frontend/src/react/review/review-page.tsx
index 4e7eb308d..f2480b707 100644
--- a/frontend/src/react/review/review-page.tsx
+++ b/frontend/src/react/review/review-page.tsx
@@ -181,7 +181,7 @@ export function ReviewPage(props: ReviewProps) {
if (bulk.isPending || !selectedRows.length) return;
if (status === 'approved' && metadata
&& selectedRows.some((row) => !choiceOf(row).candidateKey)) {
- setFeedback('请先为所选的多来源候选选择来源。');
+ setFeedback('先为所选的多来源候选选择来源。');
return;
}
setFeedback('');
diff --git a/frontend/src/react/scraping/scraping-page.tsx b/frontend/src/react/scraping/scraping-page.tsx
index 92819f030..c4655419c 100644
--- a/frontend/src/react/scraping/scraping-page.tsx
+++ b/frontend/src/react/scraping/scraping-page.tsx
@@ -172,7 +172,7 @@ function SourceCard({ source, toast }: { source: Source } & ScrapingProps) {
{source.accepts_cookie ? <>
<p className="text-body-2-regular text-text-secondary">
{source.cookie_saved
- ? 'Cookie 已保存,登录是否有效请在抓取时确认。'
+ ? 'Cookie 已保存;登录是否有效要到抓取时才知道。'
: '需要登录时,任选一种方式提供 Cookie。'}
</p>
{/* 两种方式互斥,交上去的只能是其中一种:切换时把另一种的输入清掉,
@@ -305,7 +305,7 @@ export function ScrapingPage({ toast }: ScrapingProps) {
}
return (
<Page>
- <p className="text-body-2-regular text-text-secondary">高清图片可能需要代理才能下载,请先检查连接。</p>
+ <p className="text-body-2-regular text-text-secondary">高清图片可能要经代理才能下载,先检查连接。</p>
<CoverCard toast={toast} />
{(data.sources || []).map(
(source) => <SourceCard key={source.source} source={source} toast={toast} />)}
diff --git a/frontend/src/react/settings/access-settings.tsx b/frontend/src/react/settings/access-settings.tsx
index a1b1c6480..a7e35c5d2 100644
--- a/frontend/src/react/settings/access-settings.tsx
+++ b/frontend/src/react/settings/access-settings.tsx
@@ -17,7 +17,7 @@ import { busyProps, useAction } from './use-action';
type FieldErrors = Partial<Record<'current_password' | 'password' | 'confirmation', string>>;
const HELP: Partial<Record<AccessState['mode'], string>> = {
- legacy: '当前使用系统生成的访问口令。你可以设置自己的密码,或关闭登录要求。',
+ legacy: '当前使用系统生成的访问口令。改设自己的密码,或关闭登录要求。',
locked: '访问设置无法读取,请在本机检查配置文件。',
password: '已设置密码。新设备需要登录,保持登录时间在登录页选择。',
};
@@ -69,7 +69,7 @@ export function AccessSettings({ initial, receipt }: AccessSettingsProps) {
? <Note tone="warning" title="未设置访问密码">能连接到 Peach 的设备打开地址就能看馆藏,不需要登录。</Note>
: null}
{state.mode === 'password' || state.mode === 'legacy'
- ? <Checkbox isSelected={disable} onChange={setDisable}>关闭访问密码,允许能连接到 Peach 的设备直接访问</Checkbox>
+ ? <Checkbox isSelected={disable} onChange={setDisable}>关闭访问密码</Checkbox>
: null}
{state.mode === 'password'
? <Input id="access-current" type="password" label="当前访问密码" autoComplete="current-password" maxLength={256}
diff --git a/frontend/src/react/settings/clouddrive-guide.tsx b/frontend/src/react/settings/clouddrive-guide.tsx
index 68b9745ea..27df040d9 100644
--- a/frontend/src/react/settings/clouddrive-guide.tsx
+++ b/frontend/src/react/settings/clouddrive-guide.tsx
@@ -20,7 +20,7 @@ export function CloudDriveGuide() {
<ExternalLink href="https://www.clouddrive2.com/help.html">挂载帮助</ExternalLink>
</Help>
<Disclosure summary="CloudDrive 缓存建议">
- <Help>看缓存放在哪块硬盘上,照那一档填。这是起步值,填得越大不一定越快。</Help>
+ <Help>看缓存放在哪块硬盘上,照那一档填。这是起步值,按实际播放表现再调。</Help>
{/* 三档同形、跨档比较:窄处每档一块纵排,宽处三项读数排成三列对齐。 */}
<ul aria-label="按缓存所在硬盘分档" className="flex flex-col gap-2">
{CLOUDDRIVE_PROFILES.map((profile) => (
@@ -43,7 +43,7 @@ export function CloudDriveGuide() {
<li>Buffer Cache 占内存,磁盘缓存和文件夹缓存占硬盘,改一个管不住另外两个。</li>
</ul>
<Help>
- 三处缓存分别管什么、这几个值怎么往上调、码率和速度怎么换算、线程上限与直链代理怎么取舍,以及这些起步值的来源,都在
+ 三处缓存的分工、往上调的方法和这些起步值的来源在
<ExternalLink href="https://github.com/longmeidao/peach/blob/master/docs/CLOUDDRIVE.md">CloudDrive 配置与调优</ExternalLink>。
</Help>
</Disclosure>
diff --git a/frontend/src/react/settings/general-settings.tsx b/frontend/src/react/settings/general-settings.tsx
index 700d99093..bc36f8cf6 100644
--- a/frontend/src/react/settings/general-settings.tsx
+++ b/frontend/src/react/settings/general-settings.tsx
@@ -36,7 +36,7 @@ export function StartupSettings({ startup, receipt }: { startup: StartupState; r
<SettingsRow label="开机后启动 Peach">
<Switch aria-label="开机后启动 Peach" isSelected={enabled} isDisabled={!startup.available} onChange={setEnabled} />
</SettingsRow>
- <SettingsRow label="静默启动" description="静默启动仅显示托盘,开机后启动 Peach 打开时生效。">
+ <SettingsRow label="静默启动" description="开机后只显示托盘图标,不打开网页;「开机后启动 Peach」打开时生效。">
<Switch aria-label="静默启动" isSelected={silent} isDisabled={!startup.available || !enabled} onChange={setSilent} />
</SettingsRow>
<SettingsRow label="在桌面创建快捷方式" description={startup.desktop_message || '双击图标打开 Peach 网页;卸载时一并移除。'}>
diff --git a/frontend/src/react/settings/maintenance-settings.tsx b/frontend/src/react/settings/maintenance-settings.tsx
index 6590e4f3b..f1aebdc8c 100644
--- a/frontend/src/react/settings/maintenance-settings.tsx
+++ b/frontend/src/react/settings/maintenance-settings.tsx
@@ -69,7 +69,7 @@ export function AutomaticUpdates({ initial, receipt }: { initial: AutomaticUpdat
? '自动更新需要由托盘管理的服务。'
: initial.download_available
? '开启后一分钟内开始检查。下载完成后,在此确认重启安装。'
- : '开启后一分钟内开始检查。源码运行请前往发布页获取新版本。';
+ : '开启后一分钟内开始检查。源码运行时在发布页获取新版本。';
return (
<Section title="自动更新" onSubmit={submit}>
<Rows>
@@ -136,7 +136,7 @@ export function UninstallSettings(
return (
<Section id="uninstallPeach" title="卸载 Peach">
<Stack>
- {uninstall.available ? <Help>卸载会退出 Peach、移除程序、开机自启和桌面图标。原始媒体文件保留。</Help> : null}
+ {uninstall.available ? <Help>卸载移除 Peach 程序本身,原始媒体文件保留。</Help> : null}
<Checkbox isSelected={removeData} isDisabled={!uninstall.full_available || Boolean(accepted)} onChange={setRemoveData}>
完全卸载:同时删除设置、本地数据库、观看记录、凭据和缓存
</Checkbox>
diff --git a/frontend/src/react/settings/network-settings.tsx b/frontend/src/react/settings/network-settings.tsx
index 02effbe4b..a65a558b6 100644
--- a/frontend/src/react/settings/network-settings.tsx
+++ b/frontend/src/react/settings/network-settings.tsx
@@ -41,7 +41,7 @@ export function PeachProxy({ initial, receipt }: { initial: PeachProxyState; rec
return (
<Section id="peachProxy" title="Peach 代理" onSubmit={submit}>
<Rows>
- <SettingsRow label="连接方式" description="采集来源选择“Peach 代理”时共用此设置。">
+ <SettingsRow label="连接方式" description="采集来源选「Peach 代理」时共用这里的连接方式。">
<Select aria-label="连接方式" selectedKey={mode} onSelectionChange={(key) => { if (key !== null) setMode(String(key)); }}>
{PROXY_MODES.map(([key, name]) => <SelectItem key={key} id={key}>{name}</SelectItem>)}
</Select>
diff --git a/frontend/src/react/settings/release-updates.tsx b/frontend/src/react/settings/release-updates.tsx
index b2e351528..7c6a29b4d 100644
--- a/frontend/src/react/settings/release-updates.tsx
+++ b/frontend/src/react/settings/release-updates.tsx
@@ -103,7 +103,7 @@ export function ReleaseUpdates({ initial, initialJob }: { initial: ReleaseState;
{job.state === 'error' ? <ErrorText>{job.message}</ErrorText> : null}
{job.state !== 'idle' && job.state !== 'error' ? (
<div aria-live="polite" className="flex flex-col gap-2">
- <Progress label="更新准备进度:下载、校验、解压、准备安装" value={job.progress} stops={STOPS} />
+ <Progress label="更新准备进度" value={job.progress} stops={STOPS} />
<Help>下载 → 校验 → 解压 → 准备安装 · {job.message}</Help>
<Help>{reading}</Help>
</div>
diff --git a/frontend/src/react/settings/tunnel-settings.tsx b/frontend/src/react/settings/tunnel-settings.tsx
index 4558358dc..0a71d918d 100644
--- a/frontend/src/react/settings/tunnel-settings.tsx
+++ b/frontend/src/react/settings/tunnel-settings.tsx
@@ -25,7 +25,7 @@ const MODES: [TunnelState['mode'], string][] = [['quick', '临时链接'], ['nam
const HELP: Record<TunnelState['mode'], string> = {
quick: '只用于临时预览;地址随机、重启后会变化。启动前必须设置访问密码。',
- named: '地址是你在 Cloudflare 后台绑定的公开主机名,重启后不变。启动前必须设置访问密码,'
+ named: '地址是 Cloudflare 后台绑定的公开主机名,重启后不变。启动前必须设置访问密码,'
+ '身份策略在 Cloudflare Access 里配置。',
};
@@ -121,7 +121,7 @@ export function TunnelSettings({ revision: initialRevision, initial, receipt }:
: '在 Cloudflare Zero Trust 的隧道详情页复制。'} />
</> : null}
{!state.available
- ? <Note tone="warning" title="找不到 cloudflared">请安装官方 cloudflared,或在设置文件的 tunnel.binary 指定路径,也可用 PEACH_CLOUDFLARED 指定。</Note>
+ ? <Note tone="warning" title="找不到 cloudflared">安装官方 cloudflared,或用设置文件的 tunnel.binary 与 PEACH_CLOUDFLARED 指定路径。</Note>
: null}
{state.state === 'running' && state.url
? <Note tone="info" title="公网地址"><ExternalLink href={state.url}>{state.url}</ExternalLink></Note>
@@ -130,7 +130,7 @@ export function TunnelSettings({ revision: initialRevision, initial, receipt }:
{state.error ? <ErrorText>{state.error}</ErrorText> : null}
{action.error ? <ErrorText>{action.error}</ErrorText> : null}
</Stack>
- <Footer status={state.enabled ? '服务重启时会按设置尝试恢复。' : '默认关闭,不会自动暴露本机服务。'}>
+ <Footer status={state.enabled ? '服务重启时会按设置尝试恢复。' : '服务重启后保持关闭。'}>
<Button onClick={toggle} {...busyProps(action.busy === 'toggle')}>
{active ? '停止公网入口' : '启动公网入口'}
</Button>
diff --git a/frontend/src/react/stats/stats-page.tsx b/frontend/src/react/stats/stats-page.tsx
index 85dd45c1c..54a24c67c 100644
--- a/frontend/src/react/stats/stats-page.tsx
+++ b/frontend/src/react/stats/stats-page.tsx
@@ -40,7 +40,7 @@ const RANKING_PREVIEW = 10;
const CARD = `${cardClass()} flex flex-col gap-4`;
-const NO_VIDEO_HINT = '添加媒体文件夹或关注来源,开始建立你的馆藏。';
+const NO_VIDEO_HINT = '添加媒体文件夹或关注来源后,这里会显示馆藏统计。';
const NO_TAG_HINT = '补全资料或添加标签后,这里会显示馆藏中的内容标签。';
const NO_WATCH_HINT = '开始播放后,这里会显示最近的真实观看证据。';
const NO_TAG_SOURCE_HINT = '刮削或手动打标之后,这里会显示每个来源覆盖了多少视频。';
diff --git a/frontend/test/react/maintenance-settings.test.tsx b/frontend/test/react/maintenance-settings.test.tsx
index 80d1bff37..5f00db7be 100644
--- a/frontend/test/react/maintenance-settings.test.tsx
+++ b/frontend/test/react/maintenance-settings.test.tsx
@@ -63,7 +63,7 @@ describe('自动更新', () => {
const host = await mount(<AutomaticUpdates initial={{ ...automatic, mode: 'check', download_available: false }} receipt={receipt} />);
expect(switches(host)[1]!.disabled).toBe(true);
const interval = [...host.querySelectorAll('p')].find((p) => p.textContent === '检查频率');
- expect(interval?.nextElementSibling?.textContent).toBe('开启后一分钟内开始检查。源码运行请前往发布页获取新版本。');
+ expect(interval?.nextElementSibling?.textContent).toBe('开启后一分钟内开始检查。源码运行时在发布页获取新版本。');
await submit(host.querySelector('form'));
await settle();
expect(host.querySelector('[role="alert"]')?.textContent).toContain('设置正在保存');
diff --git a/frontend/test/react/review.test.tsx b/frontend/test/react/review.test.tsx
index bfb1fd5fb..d06208339 100644
--- a/frontend/test/react/review.test.tsx
+++ b/frontend/test/react/review.test.tsx
@@ -219,7 +219,7 @@ it('多来源候选没选来源就批量通过时先说清楚,不替人按下
await click(buttonIn(host, '全选本页'));
await click(buttonIn(host, '通过所选'));
await settle();
- expect(statusText(host)).toContain('请先为所选的多来源候选选择来源。');
+ expect(statusText(host)).toContain('先为所选的多来源候选选择来源。');
expect(queueOf().sections.metadata_fields).toHaveLength(QUEUE.length);
});
diff --git a/frontend/test/react/scraping.test.tsx b/frontend/test/react/scraping.test.tsx
index 5f1dcb129..2a81878a1 100644
--- a/frontend/test/react/scraping.test.tsx
+++ b/frontend/test/react/scraping.test.tsx
@@ -116,7 +116,7 @@ it('保存后清空秘密输入,列表就地换成服务端回的那一条,
},
});
expect(password(host)?.value, '保存回来之后页面上不再留着刚交上去的那一份').toBe('');
- expect(host.textContent).toContain('登录是否有效请在抓取时确认');
+ expect(host.textContent).toContain('登录是否有效要到抓取时才知道');
expect(buttonNamed('撤销 Cookie', host)).not.toBeNull();
expect(toast).toHaveBeenCalledWith('来源设置已保存');
expect(calls.filter((call) => call.path === '/api/scraping' && call.method === 'GET'),
diff --git a/tests/test_web_ui.py b/tests/test_web_ui.py
index 17c835a0b..63231fd94 100644
--- a/tests/test_web_ui.py
+++ b/tests/test_web_ui.py
@@ -4761,7 +4761,7 @@ class WebUiSourceTests(unittest.TestCase):
self.assertIn(".followdetailmedia.framed .followdetailposter{width:100%;aspect-ratio:var(--follow-frame-ratio)}", online)
self.assertCode("if(fallback&&el.getAttribute('src')!==fallback){")
self.assertCode("el.src=fallback;if(thumbFallback)thumbFallback.hidden=false;return}")
- self.assertPageContains("data-media-thumb-fallback hidden>原图没取回来,这里先显示缩略图")
+ self.assertPageContains("data-media-thumb-fallback hidden>原图未取回,先显示缩略图")
# 灯箱里翻到的每一张同样退回它自己的缩略图。
self.assertCode("box.querySelectorAll('.photomain img').forEach((img,at)=>img.addEventListener('error',()=>{")
self.assertCode("if(thumb&&img.getAttribute('src')!==thumb)img.src=thumb},{once:true}));")
@@ -4938,7 +4938,7 @@ class WebUiSourceTests(unittest.TestCase):
self.assertPageContains(
"await mountIsland('configuration',host,\n"
" {receipt:message=>actionReceipt(message),reopenTutorial:reopenTutorialFromSettings},{isCurrent:open});")
- self.assertPageContains("{label:'该配置需在服务端设备修改'}")
+ self.assertPageContains("{label:'在服务端设备修改'}")
# 弹层里那一份配置页已经由外面那圈分区页签管着,别再给它自己叠一排。
self.assertPageContains("const config=document.querySelector('#stats .configpage');")
# `runtimeConfigurable` 还有第二个用处:馆藏空态按它决定给不给「去配置媒体文件夹」。
@@ -4970,7 +4970,7 @@ class WebUiSourceTests(unittest.TestCase):
self.assertPageContains(
"const groups=[...settings.querySelectorAll(':scope > .settinggroup:not([hidden])')];")
# 两条分支各自列出来:读不到服务端时那一句话也得有人能看见。
- self.assertPageContains("{label:'该配置需在服务端设备修改'}")
+ self.assertPageContains("{label:'在服务端设备修改'}")
self.assertPageContains(" list();\n return;\n }")
# 挂到一半被关掉的那次不算数,否则留下的是一条点开什么都没有的「这台电脑」。
self.assertPageContains("if(!open()){machineSettingsMounted=false;return}")
@@ -5260,7 +5260,7 @@ class WebUiSourceTests(unittest.TestCase):
self.assertIn('<Note tone="error" title={`${failures.length} 个来源检查失败`}',
(follow / "source-list.tsx").read_text(encoding="utf-8"))
credentials = (follow / "credentials.tsx").read_text(encoding="utf-8")
- self.assertIn("const WORLD_READABLE = '文件权限过宽,请在运行 Peach 的 POSIX 主机上收紧为 0600。'",
+ self.assertIn("const WORLD_READABLE = '文件权限过宽。在运行 Peach 的 POSIX 主机上收紧为 0600。'",
credentials)
self.assertIn('<Note tone="error" title="凭据文件权限过宽">{WORLD_READABLE}</Note>', credentials)
self.assertPageLacks('class="fnote warn"')
@@ -12259,8 +12259,8 @@ class WebUiSourceTests(unittest.TestCase):
self.assertPageContains('<symbol id="i-folder-open"')
def test_offline_source_is_reported_as_a_refusal_not_a_failure(self):
- # 盘没挂上时拒绝对账,措辞必须让人看懂「不是出错,是我不敢删」。
- self.assertPageContains("'source offline':'来源不在线,已拒绝对账")
+ # 盘没挂上时跳过对账,措辞要点明来源状态和恢复办法,别读成一次失败。
+ self.assertPageContains("'source offline':'来源不在线,这一次不对账;接上这个来源后重试'")
def test_photo_view_is_addressable_and_survives_a_reload(self):
self.assertPageContains("params.get('media')==='photos'?'photos':'videos'")
diff --git a/web/app.js b/web/app.js
index a4d53271f..ac2eb308c 100644
--- a/web/app.js
+++ b/web/app.js
@@ -309,7 +309,7 @@ const MANAGEMENT_PLACEHOLDERS={
'/configuration':()=>configurationSkeletonHtml(),
/* 采集来源是 812px 窄列里一叠同宽的 Fieldset:一块高清封面加六个来源。骨架画四块,
那是首屏装得下的张数;说明那一句是静态文案,与数据无关,立刻显示。 */
- '/scraping':()=>`<div class="scraping-page"><p>高清图片可能需要代理才能下载,请先检查连接。</p>
+ '/scraping':()=>`<div class="scraping-page"><p>高清图片可能要经代理才能下载,先检查连接。</p>
${pageSkeletonHtml('正在读取采集来源',{cards:true,count:4,fill:false,className:'cleanup-skeleton'})}</div>`,
};
/* 关注管理的骨架要照用户上次选的视图画:等数据的这段时间画成卡片、数据到了换成表格
@@ -1109,8 +1109,8 @@ async function syncMachineSettings(){
if(!open())return;
if(runtime)runtimeConfigurable=!!runtime.configurable;
if(!runtime||!runtimeConfigurable){
- host.innerHTML=noteHtml('媒体文件夹、端口、代理与更新属于运行 Peach 服务的设备;在该设备的浏览器打开设置进行修改。',
- {label:'该配置需在服务端设备修改'});
+ host.innerHTML=noteHtml('媒体文件夹、端口、代理与更新只能在运行 Peach 服务的那台设备上改:在它的浏览器里打开设置。',
+ {label:'在服务端设备修改'});
list();
return;
}
@@ -1306,7 +1306,7 @@ const postSetupTutorialTasks=async()=>{
:'当前关注来源不需要凭证。',
href:'/follow-manage?tab=source',done:credentialsReady,icon:'key-round'},
{key:'review',label:'处理首次复核',description:!libraryReady
- ?'扫描完成后,会在这里列出需要你判断的资料。':pendingReview
+ ?'扫描完成后,这里会列出需要复核的资料。':pendingReview
?`还有 ${pendingReview.toLocaleString()} 条需要复核。`:'首次复核队列已清空。',
href:'/review',done:libraryReady&&pendingReview===0,icon:'square-check-big'},
];
@@ -1327,7 +1327,7 @@ const postSetupTutorialHtml=(tasks,skippedCount,totalCount)=>{
<header class="post-setup-notification-head">
<span class="post-setup-notification-icon" aria-hidden="true">${icon('compass')}</span>
<div><h2>完成 Peach 的安装教程</h2>
- <p>已处理 ${completeCount}/${totalCount} 项,完成后会自动打勾。</p></div>
+ <p>已处理 ${completeCount}/${totalCount} 项。</p></div>
<button class="post-setup-collapse" type="button" data-tutorial-collapse aria-controls="postSetupTaskList" aria-expanded="${!collapsed}"
aria-label="${collapsed?'展开安装教程':'折叠安装教程'}">${icon(collapsed?'chevron-up':'chevron-down')}</button>
</header>
@@ -1419,7 +1419,7 @@ async function syncPostSetupTutorial(){
/* 取数失败时这张卡是死的:没有清单,也没有下一步。给一条重试和一个关闭,
不然它只能一直杵在右下角占着地方。 */
root.innerHTML=`<article class="post-setup-notification post-setup-error">${icon('alert')}
- <div><h2>暂时无法检查安装进度</h2><p>Peach 会在你切换页面或重新打开后检查。</p>
+ <div><h2>暂时无法检查安装进度</h2><p>切换页面或重新打开后会再检查一次。</p>
<div class="post-setup-error-actions"><button class="geist-button" type="button" data-tutorial-retry>重试</button>
<button class="geist-button" type="button" data-tutorial-dismiss>关闭</button></div></div></article>`;
root.removeAttribute('aria-busy');
@@ -2835,7 +2835,7 @@ $('#batchbar').querySelector('[data-batch-region]').onclick=async()=>{
const ids=[...selected];if(!ids.length)return;
const modal=formModal({
title:'判定产地',
- description:`选中的 ${ids.length} 项归为同一个产地。这是你的判断,之后的刮削和自动推断都不会改写它。`,
+ description:`选中的 ${ids.length} 项归为同一个产地。判定之后,刮削和自动推断不再改写产地。`,
body:`<div class="chips" role="group" aria-label="产地">`+REGION_CHOICES.map(([key,label])=>
`<button type="button" class="chip" aria-pressed="false" data-region-pick="${key}">
<span class="chip-label">${label}</span></button>`).join('')+`</div>`,
@@ -4638,7 +4638,7 @@ async function wireLinkManager(){
const retryRow=retryable.length?`<div class="linkretryrow">
<button class="resourceaction primary" type="button" id="linkRetryPicked" disabled>${icon('rotate-cw')}<span>重试选中的链接</span></button>
<button class="resourceaction primary" type="button" id="linkRetryAll">${icon('rotate-cw')}<span>全部重试(${retryable.length})</span></button></div>`:'';
- const unclear=table('本次未访问成功',payload.unclear||[],'未必失效:部分站点拒绝程序访问,也可能是临时故障。这些链接保留,可勾选后单独重试。',{pick:retryable.length>0,footer:retryRow});
+ const unclear=table('本次未访问成功',payload.unclear||[],'站点拒绝程序访问或一次临时故障都会落在这里。链接保留,可勾选后单独重试。',{pick:retryable.length>0,footer:retryRow});
const apply=(done&&(payload.gone||[]).length)?`<div class="resourceapplyrow"><p>删除前会逐条重验一次;此操作不可撤销。</p>
<button class="resourceaction danger" type="button" id="linkPrune">删除 ${payload.gone.length} 条失效链接</button></div>`:'';
const clean=(done&&!(payload.gone||[]).length&&!(payload.unclear||[]).length)?'<p class="resourcesyncok">全部链接均可访问。</p>':'';
@@ -5673,8 +5673,8 @@ async function openFollowDetail(id,push=true,mediaIndex=null,preserveReturn=fals
<div class="smeta mono" data-reveal-line><span>${followWhen(item)}</span>${realDuration(item.duration)?`<span>${fmtDur(item.duration)}</span>`:''}${badges?`<span class="fbadges">${badges}</span>`:''}</div>
${item.summary?`<p class="followdetailsummary">${esc(item.summary)}</p>`:''}
${mediaIssue?`<p class="fnote followmediaissue">${esc(mediaIssue)}</p>`:''}
- <p class="fnote followmediaissue" data-media-load-issue hidden>媒体没有取回来:上游这一次没给出内容,多半是站点在限流——过一阵再打开。</p>
- <p class="fnote followmediaissue" data-media-thumb-fallback hidden>原图没取回来,这里先显示缩略图:上游拦下了这一次请求。</p>
+ <p class="fnote followmediaissue" data-media-load-issue hidden>媒体未取回:上游这一次没有返回内容,多半是站点限流,过一阵再打开。</p>
+ <p class="fnote followmediaissue" data-media-thumb-fallback hidden>原图未取回,先显示缩略图:上游拦下了这一次请求。</p>
${followResourceLinks(item)}
<div class="fb followdetailactions">
<button class="later" data-follow-detail-save aria-label="${item.status==='saved'?'已保存':'保存到账本'}" title="${item.status==='saved'?'已保存':'保存到账本'}"${item.status==='saved'?' disabled':''}>${item.status==='saved'?icon('check'):icon('bookmark-plus')}</button>
@@ -7299,9 +7299,9 @@ function renderPhotoWall(kind,name,filters,data,append=false){
「文件没了」,那个闸门在服务端:整条来源不在线时直接拒绝,一行都不动。
路径始终由服务端按 asset id 查,前端拿不到也不该拿到 `path`。 ── */
const SOURCE_HINTS={
- 'source offline':'来源不在线,已拒绝对账(避免把没挂上的盘当成文件被删)',
+ 'source offline':'来源不在线,这一次不对账;接上这个来源后重试',
'source not mapped':'本机没有映射这个来源的盘符',
- 'file missing':'源文件已经不在了,点右边同步把账本对齐',
+ 'file missing':'源文件已不在盘上;点右边的同步把账本对齐',
'unsupported platform':'当前服务端系统不支持直接定位文件',
'reveal failed':'打开文件管理器失败,请重试',
};
@@ -8983,7 +8983,7 @@ async function openItem(id,push=true,queueContext=null,anchor=null){
<span class="detailmetaitem">${icon('hard-drive')}<span>${fmtSize(it.size||0)}</span></span>
${it.release_date?`<span class="detailmetaitem">${icon('calendar')}<span>${esc(it.release_date)}</span></span>`:''}
${it.region_label?`<button class="detailmetaitem regionlink" type="button" data-open-region="${esc(it.region)}"
- title="${it.region_settled?'你判定的产地;打开同产地的作品':'按番号或厂牌推断的产地,选中它批量判定后不再变;打开同产地的作品'}"
+ title="${it.region_settled?'已判定的产地;打开同产地的作品':'按番号或厂牌推断的产地,批量判定后不再变;打开同产地的作品'}"
>${icon('globe')}<span>${esc(it.region_label)}${it.region_settled?'':'(推断)'}</span></button>`:''}</div>
<div class="detailidentity">${identityRows}</div>
<div class="stags" id="detailTags"></div>
diff --git a/web/dist/peach-react.js b/web/dist/peach-react.js
index dd680494c..54d7e7d25 100644
--- a/web/dist/peach-react.js
+++ b/web/dist/peach-react.js
@@ -26819,7 +26819,7 @@ function LS({ path: e, prefix: t, className: n, onRevealed: r }) {
}
//#endregion
//#region src/react/follow-manage/credentials.tsx
-var RS = "这些账号信息存在哪里", zS = "存成运行 Peach 那台电脑上的一个文件。在 Windows 上它不额外加锁,能登录那台电脑的人都能打开。", BS = "将清除这个来源在本机和共享副本中的登录凭据。", VS = "文件权限过宽,请在运行 Peach 的 POSIX 主机上收紧为 0600。";
+var RS = "这些账号信息存在哪里", zS = "存成运行 Peach 那台电脑上的一个文件。在 Windows 上它不额外加锁,能登录那台电脑的人都能打开。", BS = "将清除这个来源在本机和共享副本中的登录凭据。", VS = "文件权限过宽。在运行 Peach 的 POSIX 主机上收紧为 0600。";
function HS(e, t) {
return (e.shared_fields || []).includes(t) ? "来自共享,留空表示不改" : e.fields.includes(t) ? "已保存,留空表示不改" : "未填写";
}
@@ -29532,7 +29532,7 @@ var $w = [
icon: Kf,
command: { stage: "collect" }
}
-], eT = K(Jx, Yx, "text-body-2-medium"), tT = "扫描媒体文件夹,导入已有资料,采集缺失信息。两段也可以分开跑:新盘刚接上时先只扫描,几万个文件登记完就能用;采集被网络拖住时只重跑采集,不必再扫一遍磁盘。", nT = "这个项目处理时间较长,暂时没有新进展。可以继续等待,或在任务结束后重试未完成项。", rT = (e) => {
+], eT = K(Jx, Yx, "text-body-2-medium"), tT = "扫描媒体文件夹,导入已有资料,采集缺失信息。两段也可以分开跑:新盘刚接上时先只扫描,几万个文件登记完就能用;采集被网络拖住时只重跑采集,不必再扫一遍磁盘。", nT = "这一项耗时较长,暂时没有新进展。任务结束后可以重试未完成的部分。", rT = (e) => {
let t = e.performer_aliases || 0, n = e.performer_avatars || 0, r = e.performer_profile_conflicts || 0, i = e.performer_profile_failed || 0;
if (!t && !n && !r && !i) return "";
let a = [`补齐女优资料:别名 ${t} 个,头像 ${n} 张`];
@@ -30850,7 +30850,7 @@ function yE(e) {
}), he = (e) => {
if (!(me.isPending || !de.length)) {
if (e === "approved" && F && de.some((e) => !ue(e).candidateKey)) {
- D("请先为所选的多来源候选选择来源。");
+ D("先为所选的多来源候选选择来源。");
return;
}
D(""), me.mutate(e);
@@ -31123,7 +31123,7 @@ function PE({ source: e, toast: t }) {
e.accepts_cookie ? /* @__PURE__ */ (0, w.jsxs)(w.Fragment, { children: [
/* @__PURE__ */ (0, w.jsx)("p", {
className: "text-body-2-regular text-text-secondary",
- children: e.cookie_saved ? "Cookie 已保存,登录是否有效请在抓取时确认。" : "需要登录时,任选一种方式提供 Cookie。"
+ children: e.cookie_saved ? "Cookie 已保存;登录是否有效要到抓取时才知道。" : "需要登录时,任选一种方式提供 Cookie。"
}),
/* @__PURE__ */ (0, w.jsx)(mv, {
"aria-label": "提供 Cookie 的方式(二选一)",
@@ -31273,7 +31273,7 @@ function IE({ toast: e }) {
return n ? /* @__PURE__ */ (0, w.jsxs)(uh, { children: [
/* @__PURE__ */ (0, w.jsx)("p", {
className: "text-body-2-regular text-text-secondary",
- children: "高清图片可能需要代理才能下载,请先检查连接。"
+ children: "高清图片可能要经代理才能下载,先检查连接。"
}),
/* @__PURE__ */ (0, w.jsx)(FE, { toast: e }),
(n.sources || []).map((t) => /* @__PURE__ */ (0, w.jsx)(PE, {
@@ -31417,7 +31417,7 @@ function KE({ startup: e, receipt: t }) {
}),
/* @__PURE__ */ (0, w.jsx)(Qx, {
label: "静默启动",
- description: "静默启动仅显示托盘,开机后启动 Peach 打开时生效。",
+ description: "开机后只显示托盘图标,不打开网页;「开机后启动 Peach」打开时生效。",
children: /* @__PURE__ */ (0, w.jsx)(WE, {
"aria-label": "静默启动",
isSelected: i,
@@ -31627,7 +31627,7 @@ function eD({ initial: e, initialJob: t }) {
className: "flex flex-col gap-2",
children: [
/* @__PURE__ */ (0, w.jsx)(dh, {
- label: "更新准备进度:下载、校验、解压、准备安装",
+ label: "更新准备进度",
value: i.progress,
stops: QE
}),
@@ -31712,7 +31712,7 @@ function iD({ initial: e, receipt: t }) {
mode: n,
interval_hours: i
}, "POST", e), () => t("已保存配置"));
- }, c = e.available ? e.download_available ? "开启后一分钟内开始检查。下载完成后,在此确认重启安装。" : "开启后一分钟内开始检查。源码运行请前往发布页获取新版本。" : "自动更新需要由托盘管理的服务。";
+ }, c = e.available ? e.download_available ? "开启后一分钟内开始检查。下载完成后,在此确认重启安装。" : "开启后一分钟内开始检查。源码运行时在发布页获取新版本。" : "自动更新需要由托盘管理的服务。";
return /* @__PURE__ */ (0, w.jsxs)(tS, {
title: "自动更新",
onSubmit: s,
@@ -31796,7 +31796,7 @@ function oD({ uninstall: e, receipt: t }) {
id: "uninstallPeach",
title: "卸载 Peach",
children: [/* @__PURE__ */ (0, w.jsxs)(rS, { children: [
- e.available ? /* @__PURE__ */ (0, w.jsx)(aS, { children: "卸载会退出 Peach、移除程序、开机自启和桌面图标。原始媒体文件保留。" }) : null,
+ e.available ? /* @__PURE__ */ (0, w.jsx)(aS, { children: "卸载移除 Peach 程序本身,原始媒体文件保留。" }) : null,
/* @__PURE__ */ (0, w.jsx)(Wx, {
isSelected: n,
isDisabled: !e.full_available || !!i,
@@ -31860,7 +31860,7 @@ function lD() {
})] }), /* @__PURE__ */ (0, w.jsxs)(dS, {
summary: "CloudDrive 缓存建议",
children: [
- /* @__PURE__ */ (0, w.jsx)(aS, { children: "看缓存放在哪块硬盘上,照那一档填。这是起步值,填得越大不一定越快。" }),
+ /* @__PURE__ */ (0, w.jsx)(aS, { children: "看缓存放在哪块硬盘上,照那一档填。这是起步值,按实际播放表现再调。" }),
/* @__PURE__ */ (0, w.jsx)("ul", {
"aria-label": "按缓存所在硬盘分档",
className: "flex flex-col gap-2",
@@ -31893,7 +31893,7 @@ function lD() {
]
}),
/* @__PURE__ */ (0, w.jsxs)(aS, { children: [
- "三处缓存分别管什么、这几个值怎么往上调、码率和速度怎么换算、线程上限与直链代理怎么取舍,以及这些起步值的来源,都在",
+ "三处缓存的分工、往上调的方法和这些起步值的来源在",
/* @__PURE__ */ (0, w.jsx)(cS, {
href: "https://github.com/longmeidao/peach/blob/master/docs/CLOUDDRIVE.md",
children: "CloudDrive 配置与调优"
@@ -32315,7 +32315,7 @@ function TD({ data: e }) {
//#endregion
//#region src/react/settings/access-settings.tsx
var ED = {
- legacy: "当前使用系统生成的访问口令。你可以设置自己的密码,或关闭登录要求。",
+ legacy: "当前使用系统生成的访问口令。改设自己的密码,或关闭登录要求。",
locked: "访问设置无法读取,请在本机检查配置文件。",
password: "已设置密码。新设备需要登录,保持登录时间在登录页选择。"
};
@@ -32356,7 +32356,7 @@ function DD({ initial: e, receipt: t }) {
n.mode === "password" || n.mode === "legacy" ? /* @__PURE__ */ (0, w.jsx)(Wx, {
isSelected: u,
onChange: d,
- children: "关闭访问密码,允许能连接到 Peach 的设备直接访问"
+ children: "关闭访问密码"
}) : null,
n.mode === "password" ? /* @__PURE__ */ (0, w.jsx)(Zy, {
id: "access-current",
@@ -32419,7 +32419,7 @@ function DD({ initial: e, receipt: t }) {
//#region src/react/settings/tunnel-settings.tsx
var OD = 2e3, kD = [["quick", "临时链接"], ["named", "命名隧道"]], AD = {
quick: "只用于临时预览;地址随机、重启后会变化。启动前必须设置访问密码。",
- named: "地址是你在 Cloudflare 后台绑定的公开主机名,重启后不变。启动前必须设置访问密码,身份策略在 Cloudflare Access 里配置。"
+ named: "地址是 Cloudflare 后台绑定的公开主机名,重启后不变。启动前必须设置访问密码,身份策略在 Cloudflare Access 里配置。"
};
function jD({ revision: e, initial: t, receipt: n }) {
let [r, i] = (0, C.useState)(t), [a, o] = (0, C.useState)(e), [s, c] = (0, C.useState)(t.mode), [l, u] = (0, C.useState)(t.hostname), [d, f] = (0, C.useState)(""), [p, m] = (0, C.useState)({}), h = Qy(), g = r.state === "starting" || r.state === "running", _ = r.named_available && s === "named";
@@ -32493,7 +32493,7 @@ function jD({ revision: e, initial: t, receipt: n }) {
r.available ? null : /* @__PURE__ */ (0, w.jsx)(J, {
tone: "warning",
title: "找不到 cloudflared",
- children: "请安装官方 cloudflared,或在设置文件的 tunnel.binary 指定路径,也可用 PEACH_CLOUDFLARED 指定。"
+ children: "安装官方 cloudflared,或用设置文件的 tunnel.binary 与 PEACH_CLOUDFLARED 指定路径。"
}),
r.state === "running" && r.url ? /* @__PURE__ */ (0, w.jsx)(J, {
tone: "info",
@@ -32511,7 +32511,7 @@ function jD({ revision: e, initial: t, receipt: n }) {
r.error ? /* @__PURE__ */ (0, w.jsx)(oS, { children: r.error }) : null,
h.error ? /* @__PURE__ */ (0, w.jsx)(oS, { children: h.error }) : null
] }), /* @__PURE__ */ (0, w.jsxs)(iS, {
- status: r.enabled ? "服务重启时会按设置尝试恢复。" : "默认关闭,不会自动暴露本机服务。",
+ status: r.enabled ? "服务重启时会按设置尝试恢复。" : "服务重启后保持关闭。",
children: [/* @__PURE__ */ (0, w.jsx)(X, {
onClick: () => v("toggle", !g, (e) => n(e.enabled ? "公网入口已启动" : "公网入口已停止")),
...Z(h.busy === "toggle"),
@@ -32567,7 +32567,7 @@ function PD({ initial: e, receipt: t }) {
children: [
/* @__PURE__ */ (0, w.jsx)(nS, { children: /* @__PURE__ */ (0, w.jsx)(Qx, {
label: "连接方式",
- description: "采集来源选择“Peach 代理”时共用此设置。",
+ description: "采集来源选「Peach 代理」时共用这里的连接方式。",
children: /* @__PURE__ */ (0, w.jsx)(xw, {
"aria-label": "连接方式",
selectedKey: i,
@@ -32837,7 +32837,7 @@ function ZD({ title: e, rows: t, unit: n = "个视频" }) {
}
//#endregion
//#region src/react/stats/stats-page.tsx
-var QD = 10, $D = `${oh()} flex flex-col gap-4`, eO = "添加媒体文件夹或关注来源,开始建立你的馆藏。", tO = "补全资料或添加标签后,这里会显示馆藏中的内容标签。", nO = "开始播放后,这里会显示最近的真实观看证据。", rO = "刮削或手动打标之后,这里会显示每个来源覆盖了多少视频。", iO = "添加媒体文件夹后,这里会显示存储空间。";
+var QD = 10, $D = `${oh()} flex flex-col gap-4`, eO = "添加媒体文件夹或关注来源后,这里会显示馆藏统计。", tO = "补全资料或添加标签后,这里会显示馆藏中的内容标签。", nO = "开始播放后,这里会显示最近的真实观看证据。", rO = "刮削或手动打标之后,这里会显示每个来源覆盖了多少视频。", iO = "添加媒体文件夹后,这里会显示存储空间。";
function aO({ term: e, value: t }) {
return /* @__PURE__ */ (0, w.jsxs)("div", {
className: "flex min-h-16 min-w-0 flex-col gap-1.5 rounded-2lg bg-background-primary-default p-3",
diff --git a/web/index.html b/web/index.html
index 07bb46420..33638cd4a 100644
--- a/web/index.html
+++ b/web/index.html
@@ -318,12 +318,12 @@
<div class="settingrow"><span><b>搜索记录</b><small>保存在 Peach 账本,所有访问端同步。</small></span><div id="searchHistoryLimitSetting"></div></div>
</section>
<section class="settinggroup"><h3>关注</h3>
- <div class="settingrow"><span><b>首次采集历史范围</b><small>按发布时间限制新来源首次导入的内容,默认最近 30 天;范围内不足 30 条时补到 30 条。没有日期的条目仍会导入;已有内容不受影响,支持历史分页的来源可手动加载更早。</small><small id="followInitialDaysState" aria-live="polite"></small></span><div id="followInitialDaysSetting"></div></div>
+ <div class="settingrow"><span><b>首次采集历史范围</b><small>按发布时间限制新来源首次导入的内容;范围内不足 30 条时补到 30 条。没有日期的条目仍会导入;已有内容不受影响,支持历史分页的来源可手动加载更早。</small><small id="followInitialDaysState" aria-live="polite"></small></span><div id="followInitialDaysSetting"></div></div>
<div class="settingrow"><span><b>关注自动更新</b><small id="followScheduleState" aria-live="polite">读取运行状态…</small></span><div id="followScheduleSetting"></div></div>
<div class="settingrow"><span><b>头像与站点图标刷新</b><small>创作者头像、来源图标和外链圆标保存在本机,到期后下次显示时重新取一次;视频与图片不保存。</small></span><div id="metadataRefreshSetting"></div></div>
</section>
<section class="settinggroup"><h3>安全</h3>
- <div class="settingrow"><span><b>保持登录时间</b><small>在此浏览器下次登录并勾选“保持登录”时生效。</small></span><div id="loginDaysSetting"></div></div>
+ <div class="settingrow"><span><b>保持登录时间</b><small>这个浏览器下次登录并勾选「保持登录」时生效。</small></span><div id="loginDaysSetting"></div></div>
<label class="settingrow"><span><b>SFW 模式</b><small id="sfwDescription">模糊、降低饱和度并压暗全站图片和视频,包括封面、头像与详情预览;停止悬停预览。文字、品牌标识和来源图标保持可见。</small></span><input class="ptoggle" type="checkbox" id="censorSetting" role="switch" aria-describedby="sfwDescription"></label>
</section>
<!-- 这一格要等服务端说清它在这台机器上是什么形态才列出来,见 syncMachineSettings。 -->