From 3326dcbe1239c0354aa0b2e46665d73df62c8ca5 Mon Sep 17 00:00:00 2001 From: lsy Date: Wed, 25 Feb 2026 17:49:19 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E5=88=A0=E9=99=A4settings=20=E5=90=AF?= =?UTF-8?q?=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/ui/src/App.tsx | 4 -- apps/ui/src/core/constants.ts | 1 - apps/ui/src/core/types.ts | 2 - apps/ui/src/features/SettingsView.tsx | 24 ---------- apps/worker/src/routes/settings.ts | 47 ++++--------------- apps/worker/src/services/checkin-scheduler.ts | 35 ++++---------- apps/worker/src/services/settings.ts | 23 ++++----- helloagents/CHANGELOG.md | 8 ++++ helloagents/modules/checkin.md | 6 +-- helloagents/modules/settings.md | 4 +- 10 files changed, 40 insertions(+), 114 deletions(-) diff --git a/apps/ui/src/App.tsx b/apps/ui/src/App.tsx index 93f40f5..25aa474 100644 --- a/apps/ui/src/App.tsx +++ b/apps/ui/src/App.tsx @@ -231,9 +231,6 @@ const App = () => { log_retention_days: String(data.settings.log_retention_days ?? 30), session_ttl_hours: String(data.settings.session_ttl_hours ?? 12), admin_password: "", - checkin_schedule_enabled: Boolean( - data.settings.checkin_schedule_enabled ?? false, - ), checkin_schedule_time: data.settings.checkin_schedule_time ?? "00:10", }); }, [data.settings]); @@ -499,7 +496,6 @@ const App = () => { const payload: Record = { log_retention_days: retention, session_ttl_hours: sessionTtlHours, - checkin_schedule_enabled: settingsForm.checkin_schedule_enabled, checkin_schedule_time: settingsForm.checkin_schedule_time.trim() || "00:10", }; diff --git a/apps/ui/src/core/constants.ts b/apps/ui/src/core/constants.ts index 2bedc9f..eb2e266 100644 --- a/apps/ui/src/core/constants.ts +++ b/apps/ui/src/core/constants.ts @@ -42,6 +42,5 @@ export const initialSettingsForm: SettingsForm = { log_retention_days: "30", session_ttl_hours: "12", admin_password: "", - checkin_schedule_enabled: false, checkin_schedule_time: "00:10", }; diff --git a/apps/ui/src/core/types.ts b/apps/ui/src/core/types.ts index 74ff9ed..c98d6d7 100644 --- a/apps/ui/src/core/types.ts +++ b/apps/ui/src/core/types.ts @@ -80,7 +80,6 @@ export type Settings = { log_retention_days: number; session_ttl_hours: number; admin_password_set?: boolean; - checkin_schedule_enabled?: boolean; checkin_schedule_time?: string; }; @@ -139,7 +138,6 @@ export type SettingsForm = { log_retention_days: string; session_ttl_hours: string; admin_password: string; - checkin_schedule_enabled: boolean; checkin_schedule_time: string; }; diff --git a/apps/ui/src/features/SettingsView.tsx b/apps/ui/src/features/SettingsView.tsx index adae2b0..7a8baff 100644 --- a/apps/ui/src/features/SettingsView.tsx +++ b/apps/ui/src/features/SettingsView.tsx @@ -73,30 +73,6 @@ export const SettingsView = ({ }} /> -
- -
- { - const target = event.currentTarget as HTMLInputElement | null; - onFormChange({ - checkin_schedule_enabled: Boolean(target?.checked), - }); - }} - /> - 启用(中国时间) -
-