Peach: Local-first video metadata scraper and media manager.
fix(settings): 合并版本统计与错误诊断开关
longmeidaoadacc66c5e0a
diff --git a/docs/DIAGNOSTICS_AUDIT.md b/docs/DIAGNOSTICS_AUDIT.mdindex 6d38ca62b..f3b0cba32 100644--- a/docs/DIAGNOSTICS_AUDIT.md+++ b/docs/DIAGNOSTICS_AUDIT.md@@ -25,7 +25,7 @@## 可选远程诊断-安装器、首次设置和设置页「应用与维护」提供「发送版本与平台统计」「自动发送错误诊断」两个独立选项。交互安装的两项均默认关闭;静默安装保留已有选择。选项保存在本机 `state/remote-reporting.json`,不写 ledger。缺少接收端时页面明确提示不会发送,仍可保存选择。+安装器、首次设置和设置页「应用与维护」提供「发送版本统计与错误诊断」单个选项,默认关闭,同时控制版本统计与错误诊断;静默安装保留已有选择。选项保存在本机 `state/remote-reporting.json`,`usage` 与 `errors` 必须同时为 `true` 才生效;仅同意一项的记录不发送,须明确选择完整范围。不写 ledger。缺少接收端时页面明确提示不会发送,仍可保存选择。| 类别 | 发送内容与筛选 || --- | --- |@@ -41,7 +41,7 @@接收端由维护者配置:源码与 Docker 使用 `PEACH_SENTRY_DSN`;Windows 发行构建从同名环境变量写入包内 `sentry.json`,GitHub Release 使用仓库变量 `PEACH_SENTRY_DSN`。只接受 Sentry 的公开 HTTPS DSN(含 US / DE 区域),不需要 API token。没有 DSN 时不会创建 SDK 客户端。SDK 自动框架集成、日志、性能追踪和指标均关闭;版本统计作为普通事件计入 Sentry 错误事件额度。账号套餐和总量以 [Sentry 订阅页](https://sentry.io/settings/) 为准。-验收使用临时数据根和 SDK 内存接收端,不发送真实用户数据。真实 Sentry 接收、发行 EXE 和原生安装器的端到端验收需配置接收端与发行制品后执行。+回归验收使用临时数据根和 SDK 内存接收端。本机已配置独立的 `peach-errors` 与 `peach-library-research` 接收项目,合成错误 `PEACH-ERRORS-1` 已在 Sentry 核对代码位置;没有发送真实馆藏,所有本机上传开关关闭。发布包的 CI 接收地址尚未配置。### 馆藏与口味群体研究diff --git a/docs/REUSE.md b/docs/REUSE.mdindex 03ccd5ea5..c683cb868 100644--- a/docs/REUSE.md+++ b/docs/REUSE.md@@ -146,7 +146,7 @@ Peach 播放器皮肤直接装饰 Video.js 10 的 light DOM:右侧控制组用启动取证复用 Python 3.14 标准库的 `sys.excepthook`、`threading.excepthook`、`sys.unraisablehook`、`logging.Handler`、`faulthandler` 和 `zipfile`(PSF 许可,无额外安装体积)。`error_reporting` 在配置与第三方依赖之前加载,`support_bundle` 仅收集选定日志和系统字段;Peach 保留脱敏、备用目录、本机权限与报告内容策略。已有诊断报告用于页面和运行期导出。临时目录与独立子进程覆盖无控制台、导入失败、线程异常、备用目录、配置损坏和脱敏。-可选远程诊断复用官方 [sentry-sdk 2.72.0](https://github.com/getsentry/sentry-python/tree/2.72.0)(MIT,维护中,支持 Python 3.14);固定版源码通过 `opensrc path pypi:sentry-sdk` 核对。SDK 负责后台 HTTP、TLS、Sentry 信封和服务端限流;Peach 负责明确同意、技术字段投影、同类错误去重与每机每日上限。两个开关均默认关闭,关闭时不构造 SDK;SDK 全局自动集成、追踪、回放、日志、会话与指标采集均关闭。`HttpTransport._send_envelope` 的窄覆盖在真正发送前复查同意版本并移除本机传输元数据;它是固定版本的内部接口,升级必须通过真实 SDK 信封回归。无真实外发的内存接收端检查最终字节、停用后队列失效与断网不影响本机取证。新增依赖仅 `sentry-sdk`,复用已声明的 urllib3 / certifi;体积以发行构建为准。未采用自写 Sentry 协议或 Workers 收集后台,避免另行维护传输、去重和查看界面。没有真实 ledger 写入。+可选远程诊断复用官方 [sentry-sdk 2.72.0](https://github.com/getsentry/sentry-python/tree/2.72.0)(MIT,维护中,支持 Python 3.14);固定版源码通过 `opensrc path pypi:sentry-sdk` 核对。SDK 负责后台 HTTP、TLS、Sentry 信封和服务端限流;Peach 负责明确同意、技术字段投影、同类错误去重与每机每日上限。版本统计与错误诊断共用默认关闭的开关,关闭时不构造 SDK;SDK 全局自动集成、追踪、回放、日志、会话与指标采集均关闭。`HttpTransport._send_envelope` 的窄覆盖在真正发送前复查同意版本并移除本机传输元数据;它是固定版本的内部接口,升级必须通过真实 SDK 信封回归。无真实外发的内存接收端检查最终字节、停用后队列失效与断网不影响本机取证。新增依赖仅 `sentry-sdk`,复用已声明的 urllib3 / certifi;体积以发行构建为准。未采用自写 Sentry 协议或 Workers 收集后台,避免另行维护传输、去重和查看界面。没有真实 ledger 写入。馆藏与口味群体研究复用 `LedgerDatabase.read_connection`、`taste_preferences.preference_profile`、`error_reporting.redact` 与同一固定版 Sentry 的内存附件 API;偏好权重与身份口径不另写一份。研究使用独立项目、独立同意文件和字段版本;默认关闭,预览只在用户点击时读取,后台读取要求有效同意与接收端。没有复制浏览器资料、原始历史或媒体,没有真实 ledger 写入。SDK 本机安装目录含缓存约 3.1 MB,Windows 构建复制 MIT 许可证元数据;压缩后的发行增量未单独测量。diff --git a/docs/STATUS.md b/docs/STATUS.mdindex 452d12439..f76e07e1d 100644--- a/docs/STATUS.md+++ b/docs/STATUS.md@@ -6,7 +6,7 @@## 运行态-- [诊断与研究](DIAGNOSTICS_AUDIT.md):默认关;明细预览同意;无 DSN。+- [诊断与研究](DIAGNOSTICS_AUDIT.md):版本统计与错误诊断共用默认关闭的开关;馆藏明细单独预览同意;本机 DSN 已核验,发行 CI 待配置。- [115](BROWSER_HISTORY.md)- [Docker](DOCKER.md)- 名册:艺人(含动画作者)|卖家|在线;素人须有非职业出演证据,FC2 仅筛作品。diff --git a/frontend/src/react/pages/setup/setup-form.tsx b/frontend/src/react/pages/setup/setup-form.tsxindex 14ef20d22..9b3ad3c22 100644--- a/frontend/src/react/pages/setup/setup-form.tsx+++ b/frontend/src/react/pages/setup/setup-form.tsx@@ -246,7 +246,7 @@ export function SetupForm({ setup, onDone }: { setup: SetupQuestions; onDone: (d{failure ? <ErrorText>{failure}</ErrorText> : null}{reporting ? <CardGroup>- <GroupTitle>遥测与错误诊断</GroupTitle>+ <GroupTitle>版本统计与错误诊断</GroupTitle><ReportingChoices value={reporting} onChange={setReporting} /><Help>馆藏与口味分享默认关闭。完成设置后,可在「应用与维护」查看明细预览并明确同意。</Help></CardGroup> : null}diff --git a/frontend/src/react/settings/remote-reporting-settings.tsx b/frontend/src/react/settings/remote-reporting-settings.tsxindex af87aa82f..5cc7dbb89 100644--- a/frontend/src/react/settings/remote-reporting-settings.tsx+++ b/frontend/src/react/settings/remote-reporting-settings.tsx@@ -18,11 +18,9 @@ export function ReportingChoices({ value, onChange }: {}) {return <><Rows>- <SettingsRow label="发送版本与平台统计" description={value.fields.usage}>- <Switch aria-label="发送版本与平台统计" isSelected={value.usage} onChange={(usage) => onChange({ ...value, usage })} />- </SettingsRow>- <SettingsRow label="自动发送错误诊断" description={value.fields.errors}>- <Switch aria-label="自动发送错误诊断" isSelected={value.errors} onChange={(errors) => onChange({ ...value, errors })} />+ <SettingsRow label="发送版本统计与错误诊断" description={`${value.fields.usage} ${value.fields.errors}`}>+ <Switch aria-label="发送版本统计与错误诊断" isSelected={value.usage && value.errors}+ onChange={(enabled) => onChange({ ...value, usage: enabled, errors: enabled })} /></SettingsRow></Rows><Stack divided>@@ -37,7 +35,7 @@ export function RemoteReportingSettings({ initial, receipt }: {}) {const [value, setValue] = useState(initial);const action = useAction();- return <Section title="遥测与错误诊断" onSubmit={(event) => {+ return <Section title="版本统计与错误诊断" onSubmit={(event) => {event.preventDefault();void action.run('save', (signal) => apiSend<RemoteReportingState>('/api/configuration/remote-reporting',{ usage: value.usage, errors: value.errors }, 'POST', signal), (saved) => {diff --git a/frontend/test/react/remote-reporting.test.tsx b/frontend/test/react/remote-reporting.test.tsxindex 1cbe4ab58..bfc235b9b 100644--- a/frontend/test/react/remote-reporting.test.tsx+++ b/frontend/test/react/remote-reporting.test.tsx@@ -9,22 +9,24 @@ const initial: RemoteReportingState = {notice: '不自动发送日志正文或媒体信息。',};-describe('遥测与错误诊断', () => {- it('默认关闭,缺少接收端时显示明确状态,两个选项独立保存', async () => {- const fetcher = vi.fn(async () => ({ ok: true, json: async () => ({ ...initial, errors: true }) }));+describe('版本统计与错误诊断', () => {+ it('单个开关默认关闭,开启后共同保存版本统计与错误诊断', async () => {+ const fetcher = vi.fn(async () => ({ ok: true, json: async () => ({ ...initial, usage: true, errors: true }) }));vi.stubGlobal('fetch', fetcher);const receipt = vi.fn();const host = await mount(<RemoteReportingSettings initial={initial} receipt={receipt} />);- expect(switches(host).map((node) => node.checked)).toEqual([false, false]);+ expect(switches(host).map((node) => node.checked)).toEqual([false]);expect(host.textContent).toContain('此版本尚未配置诊断接收端');- await click(switches(host)[1]!);+ expect(host.textContent).toContain(initial.fields.usage);+ expect(host.textContent).toContain(initial.fields.errors);+ await click(switches(host)[0]!);await click(buttonNamed('保存配置', host));await settle();const [url, init] = fetcher.mock.calls[0]! as unknown as [string, RequestInit];expect(url).toBe('/api/configuration/remote-reporting');- expect(JSON.parse(String(init.body))).toEqual({ usage: false, errors: true });+ expect(JSON.parse(String(init.body))).toEqual({ usage: true, errors: true });expect(receipt).toHaveBeenCalledWith('已保存诊断选项');- expect(switches(host).map((node) => node.checked)).toEqual([false, true]);+ expect(switches(host).map((node) => node.checked)).toEqual([true]);});it('保存失败保留选择和错误,关闭选项可以再次提交', async () => {diff --git a/frontend/test/react/setup-page.test.tsx b/frontend/test/react/setup-page.test.tsxindex bbd85be8d..b999bc825 100644--- a/frontend/test/react/setup-page.test.tsx+++ b/frontend/test/react/setup-page.test.tsx@@ -74,18 +74,17 @@ const alertsWith = (root: ParentNode, message: string) =>[...root.querySelectorAll('[role="alert"]')].filter((node) => node.textContent?.includes(message));const occurrences = (root: HTMLElement, message: string) => (root.textContent ?? '').split(message).length - 1;-it('首启诊断开关按服务端同意值显示,明确提交独立选择', async () => {+it('首启版本统计与错误诊断共用一个默认关闭的开关', async () => {const reporting = { usage: false, errors: false, available: false,fields: { usage: '版本与系统', errors: '异常链与错误码' }, notice: '不发送媒体信息' };const { host, sent } = await open({ remote_reporting: reporting, access_enabled: false },{ [SETUP_URL]: { status: 200, body: done() } });- const usage = host.querySelector<HTMLInputElement>('input[aria-label="发送版本与平台统计"]')!;- const errors = host.querySelector<HTMLInputElement>('input[aria-label="自动发送错误诊断"]')!;- expect(usage.checked).toBe(false);- expect(errors.checked).toBe(false);- await click(errors);+ const reportingSwitches = host.querySelectorAll<HTMLInputElement>('input[aria-label="发送版本统计与错误诊断"]');+ expect(reportingSwitches).toHaveLength(1);+ expect(reportingSwitches[0]!.checked).toBe(false);+ await click(reportingSwitches[0]!);await submitForm(host);- expect(sent(SETUP_URL).remote_reporting).toEqual({ usage: false, errors: true });+ expect(sent(SETUP_URL).remote_reporting).toEqual({ usage: true, errors: true });});/** 这句错误在页面上只有一份,落在一个 `role="alert"` 里,并由框的 `aria-describedby` 指到。 */diff --git a/scripts/installer/peach.iss b/scripts/installer/peach.issindex b355dfc22..90f7d0f7d 100644--- a/scripts/installer/peach.iss+++ b/scripts/installer/peach.iss@@ -59,12 +59,11 @@ chs.DirectoryNotDedicated=请选择空文件夹或已有的 Peach 安装目录chs.DirectoryNotWritable=当前用户无法写入程序目录或其上级目录。请选择有写入权限的位置,以便安装和更新 Peach。chs.DirectoryLink=程序目录和数据目录不能经过目录链接。请选择普通文件夹。chs.DirectoryMove=请先卸载现有 Peach(保留数据),再选择新的安装目录。-chs.ReportingFailed=遥测与错误诊断选项未能保存。首次设置或设置页可再次选择;未保存的同意不会启用上传。+chs.ReportingFailed=版本统计与错误诊断选项未能保存。首次设置或设置页可再次选择;未保存的同意不会启用上传。[Tasks]Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked-Name: "usage"; Description: "发送版本与操作系统类型至 Sentry(每天最多一次,不含安装标识)"; GroupDescription: "可选遥测与诊断(默认关闭,设置页可关闭):"; Flags: unchecked-Name: "errors"; Description: "发送技术错误诊断至 Sentry(版本、系统、Python、CPU 架构、异常类型、代码文件名与行号;每天最多 20 条,不含错误原文、日志正文或媒体信息;服务端可见连接 IP)"; GroupDescription: "可选遥测与诊断(默认关闭,设置页可关闭):"; Flags: unchecked+Name: "reporting"; Description: "发送版本统计与错误诊断至 Sentry(版本与系统每天最多一次;Python、CPU 架构、异常类型及代码位置等诊断每天最多 20 条;不含安装标识、错误原文、日志正文或媒体信息;服务端可见连接 IP)"; GroupDescription: "可选版本统计与错误诊断(默认关闭,设置页可关闭):"; Flags: unchecked[InstallDelete]; PyInstaller 的依赖都在 _internal 里;覆盖安装留下上一版多出来的库会被新版误加载。@@ -210,16 +209,14 @@ end;procedure CurStepChanged(CurStep: TSetupStep);varResultCode: Integer;- UsageConsent, ErrorConsent: String;+ ReportingConsent: String;beginif (CurStep = ssPostInstall) and not WizardSilent() thenbegin- UsageConsent := '0';- ErrorConsent := '0';- if WizardIsTaskSelected('usage') then UsageConsent := '1';- if WizardIsTaskSelected('errors') then ErrorConsent := '1';+ ReportingConsent := '0';+ if WizardIsTaskSelected('reporting') then ReportingConsent := '1';if not Exec(ExpandConstant('{app}\Peach.exe'),- '--installer-reporting ' + UsageConsent + ' ' + ErrorConsent,+ '--installer-reporting ' + ReportingConsent + ' ' + ReportingConsent,ExpandConstant('{app}'), SW_HIDE, ewWaitUntilTerminated, ResultCode) or (ResultCode <> 0) thenSuppressibleMsgBox(CustomMessage('ReportingFailed'), mbError, MB_OK, IDOK);end;diff --git a/src/peach/remote_reporting.py b/src/peach/remote_reporting.pyindex c007ab66d..af1195eb9 100644--- a/src/peach/remote_reporting.py+++ b/src/peach/remote_reporting.py@@ -42,7 +42,8 @@ def _read(path):def consent(config=None):value = _read(_config(config).directory("state") / "remote-reporting.json")- return {"usage": value.get("usage") is True, "errors": value.get("errors") is True,+ enabled = all(value.get(key) is True for key in FIELDS)+ return {"usage": enabled, "errors": enabled,"revision": str(value.get("revision", ""))}@@ -76,6 +77,8 @@ def parse_choices(body, *, partial=False):choices = {key: body.get(key, False) if partial else body.get(key) for key in FIELDS}if any(type(value) is not bool for value in choices.values()):raise ValueError("遥测和自动错误诊断必须是布尔值")+ if choices["usage"] != choices["errors"]:+ raise ValueError("版本统计与错误诊断须同时开启或关闭")return choices@@ -130,7 +133,7 @@ def _new_client(target, *, envelope_gate=None):permit = event.pop("extra", {})try:current = _read(Path(permit["consent"]))- if current.get(permit["kind"]) is not True or current["revision"] != permit["revision"]:+ if not all(current.get(key) is True for key in FIELDS) or current["revision"] != permit["revision"]:returnexcept Exception:returndiff --git a/tests/test_onboarding.py b/tests/test_onboarding.pyindex 46c8428fe..2608f6f25 100644--- a/tests/test_onboarding.py+++ b/tests/test_onboarding.py@@ -482,13 +482,13 @@ class SetupJsonContractTests(_SetupHttpCase):response = self._send("GET", self.QUESTIONS)self.assertFalse(response.json()["remote_reporting"]["usage"])self.assertFalse(response.json()["remote_reporting"]["errors"])- self._submit(remote_reporting={"usage": False, "errors": True})+ self._submit(remote_reporting={"usage": True, "errors": True})config = settings_file.load_config(environ={"PEACH_DATA_ROOT": str(self.data_root)})- self.assertFalse(remote_reporting.consent(config)["usage"])+ self.assertTrue(remote_reporting.consent(config)["usage"])self.assertTrue(remote_reporting.consent(config)["errors"])def test_remote_reporting_rejects_non_boolean_consent_before_creating_settings(self):- for value in ([], {"usage": "true"}, {"errors": 1}):+ for value in ([], {"usage": "true"}, {"errors": 1}, {"usage": False, "errors": True}):response = self._send("POST", self.SUBMIT, json=self._body(remote_reporting=value))self.assertEqual(response.status_code, 400)self.assertFalse((self.data_root / "config.toml").exists())diff --git a/tests/test_remote_reporting.py b/tests/test_remote_reporting.pyindex 765aeab65..832828ca8 100644--- a/tests/test_remote_reporting.py+++ b/tests/test_remote_reporting.py@@ -41,19 +41,32 @@ class RemoteReportingTests(unittest.TestCase):client.assert_not_called()self.assertFalse((path.parent / "remote-reporting-budget.json").exists())- def test_consent_is_strict_and_independent_and_missing_endpoint_is_visible(self):- for invalid in ({"usage": "false", "errors": False}, {"usage": True}, []):+ def test_consent_requires_joint_choice_and_missing_endpoint_is_visible(self):+ for invalid in ({"usage": "false", "errors": False}, {"usage": True}, [],+ {"usage": True, "errors": False}, {"usage": False, "errors": True}):with self.assertRaises(ValueError):reporting.save(invalid)- reporting.save({"usage": True, "errors": False})+ reporting.save({"usage": True, "errors": True})self.assertTrue(reporting.snapshot()["usage"])- self.assertFalse(reporting.snapshot()["errors"])+ self.assertTrue(reporting.snapshot()["errors"])with mock.patch.dict(os.environ, {"PEACH_SENTRY_DSN": ""}):self.assertFalse(reporting.snapshot()["available"])with mock.patch.object(reporting, "_new_client") as client:reporting.usage()client.assert_not_called()+ def test_partial_consent_keeps_both_channels_disabled(self):+ path = self.config.directory("state") / "remote-reporting.json"+ path.parent.mkdir(parents=True, exist_ok=True)+ for usage, errors in ((True, False), (False, True)):+ path.write_text(json.dumps({"usage": usage, "errors": errors, "revision": "partial"}))+ with mock.patch.object(reporting, "_new_client") as client:+ self.assertFalse(reporting.snapshot()["usage"])+ self.assertFalse(reporting.snapshot()["errors"])+ reporting.usage()+ reporting.capture("unhandled-main", ValueError("private"))+ client.assert_not_called()+def test_dsn_only_accepts_hosted_public_https_endpoint(self):for value in (DSN, DSN.replace('.us.', '.'), DSN.replace('.us.', '.de.')):with self.subTest(value=value), mock.patch.dict(os.environ, {"PEACH_SENTRY_DSN": value}):@@ -117,7 +130,7 @@ class RemoteReportingTests(unittest.TestCase):self.assertNotIn(value, wire)self.assertIn('ValueError', wire)- def test_queued_event_is_dropped_after_disable_and_reenable(self):+ def test_queued_event_requires_current_joint_consent_revision(self):from sentry_sdk.transport import HttpTransportfrom sentry_sdk.envelope import Envelopereporting.save({"usage": True, "errors": True})@@ -133,10 +146,15 @@ class RemoteReportingTests(unittest.TestCase):with mock.patch.object(HttpTransport, "_send_envelope") as network:client.transport._send_envelope(envelope)network.assert_not_called()+ path = self.config.directory('state') / 'remote-reporting.json'+ for usage, errors in ((True, False), (False, True)):+ path.write_text(json.dumps({"usage": usage, "errors": errors, "revision": previous['revision']}))+ client.transport._send_envelope(envelope)+ network.assert_not_called()def test_sdk_failure_does_not_break_local_error_recording(self):from peach import error_reporting- reporting.save({"usage": False, "errors": True})+ reporting.save({"usage": True, "errors": True})with mock.patch.object(reporting, "_new_client", side_effect=OSError('offline')), \mock.patch.object(error_reporting, 'log_directories', return_value=[self.root / 'logs']):path = error_reporting.event('unhandled-main', ValueError('local detail'))@@ -166,7 +184,7 @@ class RemoteReportingTests(unittest.TestCase):def test_installer_helper_persists_explicit_choices_in_fresh_process(self):root = Path(__file__).resolve().parents[1]env = {**os.environ, 'PYTHONPATH': str(root / 'src'), 'PEACH_SENTRY_DSN': ''}- for usage, errors in (('0', '1'), ('0', '0')):+ for usage, errors in (('1', '1'), ('0', '0')):result = subprocess.run([sys.executable, '-X', 'utf8', str(root / 'scripts/build_app_entry.py'),'--installer-reporting', usage, errors], env=env,capture_output=True, text=True, encoding='utf-8', timeout=30)@@ -196,10 +214,13 @@ class RemoteReportingApiTests(unittest.TestCase):def test_local_save_and_remote_and_cross_origin_denial(self):endpoint = '/api/configuration/remote-reporting'- body = {'usage': False, 'errors': True}+ body = {'usage': True, 'errors': True}response = self.request('POST', endpoint, body=body)self.assertEqual(response.status_code, 200, response.text)+ self.assertTrue(response.json()['usage'])self.assertTrue(response.json()['errors'])+ response = self.request('POST', endpoint, body={'usage': False, 'errors': True})+ self.assertEqual(response.status_code, 400, response.text)for peer, origin in (('198.51.100.7', 'http://test'), ('127.0.0.1', 'https://external.invalid')):response = self.request('POST', endpoint, body={'usage': False, 'errors': False}, peer=peer, origin=origin)self.assertEqual(response.status_code, 403, response.text)diff --git a/web/dist/peach-app.js b/web/dist/peach-app.jsindex 5863c1058..8df8f362f 100644--- a/web/dist/peach-app.js+++ b/web/dist/peach-app.js@@ -72364,29 +72364,19 @@ function URe({ initial: e, initialJob: t }) {//#endregion//#region src/react/settings/remote-reporting-settings.tsxfunction WRe({ value: e, onChange: t }) {- return /* @__PURE__ */ (0, C.jsxs)(C.Fragment, { children: [/* @__PURE__ */ (0, C.jsxs)(WA, { children: [/* @__PURE__ */ (0, C.jsx)(BA, {- label: "发送版本与平台统计",- description: e.fields.usage,+ return /* @__PURE__ */ (0, C.jsxs)(C.Fragment, { children: [/* @__PURE__ */ (0, C.jsx)(WA, { children: /* @__PURE__ */ (0, C.jsx)(BA, {+ label: "发送版本统计与错误诊断",+ description: `${e.fields.usage} ${e.fields.errors}`,children: /* @__PURE__ */ (0, C.jsx)(Oz, {- "aria-label": "发送版本与平台统计",- isSelected: e.usage,- onChange: (n) => t({- ...e,- usage: n- })- })- }), /* @__PURE__ */ (0, C.jsx)(BA, {- label: "自动发送错误诊断",- description: e.fields.errors,- children: /* @__PURE__ */ (0, C.jsx)(Oz, {- "aria-label": "自动发送错误诊断",- isSelected: e.errors,+ "aria-label": "发送版本统计与错误诊断",+ isSelected: e.usage && e.errors,onChange: (n) => t({...e,+ usage: n,errors: n})})- })] }), /* @__PURE__ */ (0, C.jsxs)(GA, {+ }) }), /* @__PURE__ */ (0, C.jsxs)(GA, {divided: !0,children: [/* @__PURE__ */ (0, C.jsx)(qA, { children: e.notice }), e.available ? null : /* @__PURE__ */ (0, C.jsx)(qA, { children: "此版本尚未配置诊断接收端,当前不会发送;选项保存在本机。" })]})] });@@ -72394,7 +72384,7 @@ function WRe({ value: e, onChange: t }) {function GRe({ initial: e, receipt: t }) {let [n, r] = (0, S.useState)(e), i = zA();return /* @__PURE__ */ (0, C.jsxs)(UA, {- title: "遥测与错误诊断",+ title: "版本统计与错误诊断",onSubmit: (e) => {e.preventDefault(), i.run("save", (e) => U("/api/configuration/remote-reporting", {usage: n.usage,diff --git a/web/dist/peach-pages.js b/web/dist/peach-pages.jsindex 3418e7406..8ef3ec81c 100644--- a/web/dist/peach-pages.js+++ b/web/dist/peach-pages.js@@ -20924,29 +20924,19 @@ Object.fromEntries(Object.entries({//#endregion//#region src/react/settings/remote-reporting-settings.tsxfunction wg({ value: e, onChange: t }) {- return /* @__PURE__ */ (0, z.jsxs)(z.Fragment, { children: [/* @__PURE__ */ (0, z.jsxs)(hm, { children: [/* @__PURE__ */ (0, z.jsx)(fm, {- label: "发送版本与平台统计",- description: e.fields.usage,+ return /* @__PURE__ */ (0, z.jsxs)(z.Fragment, { children: [/* @__PURE__ */ (0, z.jsx)(hm, { children: /* @__PURE__ */ (0, z.jsx)(fm, {+ label: "发送版本统计与错误诊断",+ description: `${e.fields.usage} ${e.fields.errors}`,children: /* @__PURE__ */ (0, z.jsx)(Om, {- "aria-label": "发送版本与平台统计",- isSelected: e.usage,- onChange: (n) => t({- ...e,- usage: n- })- })- }), /* @__PURE__ */ (0, z.jsx)(fm, {- label: "自动发送错误诊断",- description: e.fields.errors,- children: /* @__PURE__ */ (0, z.jsx)(Om, {- "aria-label": "自动发送错误诊断",- isSelected: e.errors,+ "aria-label": "发送版本统计与错误诊断",+ isSelected: e.usage && e.errors,onChange: (n) => t({...e,+ usage: n,errors: n})})- })] }), /* @__PURE__ */ (0, z.jsxs)(gm, {+ }) }), /* @__PURE__ */ (0, z.jsxs)(gm, {divided: !0,children: [/* @__PURE__ */ (0, z.jsx)(_m, { children: e.notice }), e.available ? null : /* @__PURE__ */ (0, z.jsx)(_m, { children: "此版本尚未配置诊断接收端,当前不会发送;选项保存在本机。" })]})] });@@ -21245,7 +21235,7 @@ function kg({ setup: e, onDone: t }) {}),E ? /* @__PURE__ */ (0, z.jsx)(vm, { children: E }) : null,b ? /* @__PURE__ */ (0, z.jsxs)(Tt, { children: [- /* @__PURE__ */ (0, z.jsx)(Et, { children: "遥测与错误诊断" }),+ /* @__PURE__ */ (0, z.jsx)(Et, { children: "版本统计与错误诊断" }),/* @__PURE__ */ (0, z.jsx)(wg, {value: b,onChange: x