diff --git a/frontend/src/i18n/locales/en/settings.ts b/frontend/src/i18n/locales/en/settings.ts index 7365a9c..8328ca2 100644 --- a/frontend/src/i18n/locales/en/settings.ts +++ b/frontend/src/i18n/locales/en/settings.ts @@ -137,10 +137,6 @@ export default { dark: 'Dark', system: 'Follow System', auto: 'Scheduled', - timezone: 'Timezone', - timezoneAria: 'Theme schedule timezone', - browser: 'Follow browser (local)', - autoHint: 'Light from {{start}}:00–{{end}}:00 in the chosen timezone, dark otherwise; the top bar toggle always works.', }, prefsCard: { title: 'Appearance & Language', diff --git a/frontend/src/i18n/locales/zh/settings.ts b/frontend/src/i18n/locales/zh/settings.ts index 6916a60..b241bce 100644 --- a/frontend/src/i18n/locales/zh/settings.ts +++ b/frontend/src/i18n/locales/zh/settings.ts @@ -137,10 +137,6 @@ export default { dark: '深色', system: '跟随系统', auto: '定时切换', - timezone: '判定时区', - timezoneAria: '主题定时切换时区', - browser: '跟随浏览器(本地)', - autoHint: '按所选时区 {{start}}:00–{{end}}:00 浅色,其余深色;顶栏可随时手动切换。', }, prefsCard: { title: '外观与语言', diff --git a/frontend/src/pages/settings/components/ThemeSection.tsx b/frontend/src/pages/settings/components/ThemeSection.tsx index 4a4e6d0..fe11595 100644 --- a/frontend/src/pages/settings/components/ThemeSection.tsx +++ b/frontend/src/pages/settings/components/ThemeSection.tsx @@ -1,4 +1,4 @@ -import { memo, useMemo } from 'react' +import { memo } from 'react' import { useTranslation } from 'react-i18next' import { useTheme } from 'next-themes' import { Sun, Moon, Monitor, Clock } from 'lucide-react' @@ -7,17 +7,8 @@ import { DAY_START_HOUR, DAY_END_HOUR, setThemeAuto, - setThemeTimezone, - listTimezones, } from '@/lib/theme-schedule' import { useScheduledTheme } from '@/hooks/useScheduledTheme' -import { - Select, - SelectContent, - SelectItem, - SelectTrigger, - SelectValue, -} from '@/components/ui/select' type ThemeMode = 'light' | 'dark' | 'system' | 'auto' @@ -36,8 +27,7 @@ const OPTIONS: Array<{ value: ThemeMode; labelKey: string; icon: typeof Sun }> = export const ThemeSection = memo(function ThemeSection() { const { theme, setTheme } = useTheme() const { t } = useTranslation('settings') - const { auto, timezone } = useScheduledTheme() - const timezones = useMemo(() => listTimezones(), []) + const { auto } = useScheduledTheme() const activeValue: ThemeMode = auto ? 'auto' : theme === 'system' ? 'system' : theme === 'dark' ? 'dark' : 'light' const selectTheme = (value: ThemeMode) => { @@ -76,19 +66,6 @@ export const ThemeSection = memo(function ThemeSection() { ) })} - {auto && ( - - )} {auto && (