refactor: system settings UI for consistent, compact layouts

Redesign the system settings interface to align with the rest of the console experience by using fixed header actions, removing redundant subtitles, respecting global content width, and standardizing responsive form layouts.

Introduce reusable settings layout primitives for forms, switch rows, grouped controls, nested control sections, title status indicators, and page action portals. Replace duplicated card-style switch markup with explicit compact components, improve nested switch readability, and reduce visual noise across authentication, billing, content, integrations, maintenance, models, and request-limit settings.

Also complete missing i18n translations, remove obsolete subtitle translation keys, refine i18n sync reporting, fix sidebar truncation for long labels, and verify the frontend with type checking and lint diagnostics.
This commit is contained in:
t0ng7u
2026-05-25 00:34:26 +08:00
parent 92a0959448
commit b08febaa3c
97 changed files with 2420 additions and 3032 deletions
@@ -53,7 +53,6 @@ import {
FormMessage,
} from '@/components/ui/form'
import { Input } from '@/components/ui/input'
import { Switch } from '@/components/ui/switch'
import {
Table,
TableBody,
@@ -63,6 +62,7 @@ import {
TableRow,
} from '@/components/ui/table'
import { Textarea } from '@/components/ui/textarea'
import { SettingsSwitchField } from '../components/settings-form-layout'
import { SettingsSection } from '../components/settings-section'
import { useUpdateOption } from '../hooks/use-update-option'
@@ -238,12 +238,7 @@ export function FAQSection({ enabled, data }: FAQSectionProps) {
}
return (
<SettingsSection
title={t('FAQ')}
description={t(
'Maintain a list of common questions for the dashboard help panel'
)}
>
<SettingsSection title={t('FAQ')}>
<div className='space-y-4'>
<div className='flex flex-wrap items-center justify-between gap-2'>
<div className='flex flex-wrap items-center gap-2'>
@@ -271,12 +266,12 @@ export function FAQSection({ enabled, data }: FAQSectionProps) {
{updateOption.isPending ? t('Saving...') : t('Save Settings')}
</Button>
</div>
<div className='flex items-center gap-2'>
<span className='text-muted-foreground text-sm'>
{t('Enabled')}
</span>
<Switch checked={isEnabled} onCheckedChange={handleToggleEnabled} />
</div>
<SettingsSwitchField
checked={isEnabled}
onCheckedChange={handleToggleEnabled}
label={t('Enabled')}
className='border-b-0 py-0'
/>
</div>
<div className='rounded-md border'>