From d774aa741e0f4451ecb5eec485094fd6f907e44d Mon Sep 17 00:00:00 2001 From: mango <1711456624@qq.com> Date: Wed, 22 Jul 2026 15:24:55 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(about):=20=E5=85=B3=E4=BA=8E?= =?UTF-8?q?=E9=A1=B5=E8=87=AA=E5=8A=A8=E6=A3=80=E6=9F=A5=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E5=BC=80=E5=85=B3=20+=20=E8=87=AA=E5=AE=9A=E4=B9=89=E6=A3=80?= =?UTF-8?q?=E6=9F=A5=E9=97=B4=E9=9A=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 autoCheckForUpdates 开关(默认开启) - 新增 autoCheckForUpdatesIntervalMinutes(默认30分钟,可选15/30/60/120/360/720/1440) - hook timer 按开关和间隔动态注册 - 关于页版本与更新卡片增加 Switch + Select 控件 - 6语种 i18n 文案 - store / hook / settings-center 测试补充 --- frontend/src/App.settings-center.test.ts | 8 ++ frontend/src/App.tsx | 43 ++++++++- .../src/hooks/useAppUpdateManager.test.tsx | 94 +++++++++++++++++++ frontend/src/hooks/useAppUpdateManager.ts | 13 ++- frontend/src/store.test.ts | 51 ++++++++++ frontend/src/store.ts | 63 +++++++++++++ shared/i18n/de-DE.json | 6 ++ shared/i18n/en-US.json | 6 ++ shared/i18n/ja-JP.json | 6 ++ shared/i18n/ru-RU.json | 6 ++ shared/i18n/zh-CN.json | 6 ++ shared/i18n/zh-TW.json | 6 ++ 12 files changed, 302 insertions(+), 6 deletions(-) diff --git a/frontend/src/App.settings-center.test.ts b/frontend/src/App.settings-center.test.ts index 4ffa6ea3..04876b3c 100644 --- a/frontend/src/App.settings-center.test.ts +++ b/frontend/src/App.settings-center.test.ts @@ -228,6 +228,14 @@ describe('settings center layout', () => { expect(appSource).toContain("gridTemplateColumns: 'minmax(0, 1fr) minmax(220px, 260px)'"); expect(appSource).toContain('className="gonavi-about-update-channel"'); expect(appSource).toContain(' state.setFontSize); const startupFullscreen = useStore(state => state.startupFullscreen); const setStartupFullscreen = useStore(state => state.setStartupFullscreen); + const autoCheckForUpdates = useStore(state => state.autoCheckForUpdates); + const setAutoCheckForUpdates = useStore(state => state.setAutoCheckForUpdates); + const autoCheckForUpdatesIntervalMinutes = useStore(state => state.autoCheckForUpdatesIntervalMinutes); + const setAutoCheckForUpdatesIntervalMinutes = useStore(state => state.setAutoCheckForUpdatesIntervalMinutes); const globalProxy = useStore(state => state.globalProxy); const replaceConnections = useStore(state => state.replaceConnections); const replaceGlobalProxy = useStore(state => state.replaceGlobalProxy); @@ -5016,8 +5021,8 @@ function App() {
-
-
{t('app.about.field.update_channel')}
+
+
{t('app.about.field.update_channel')}
{t('app.about.version_update.channel_hint')}
+
+
{t('app.about.field.auto_check_updates')}
+
+ setAutoCheckForUpdates(checked)} + /> +
+
+ {autoCheckForUpdates ? ( + <> +
+
{t('app.about.field.auto_check_interval')}
+