✨ 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:
@@ -21,6 +21,7 @@ import type { SecuritySettings } from '../types'
|
||||
import {
|
||||
SECURITY_DEFAULT_SECTION,
|
||||
getSecuritySectionContent,
|
||||
getSecuritySectionMeta,
|
||||
} from './section-registry.tsx'
|
||||
|
||||
const defaultSecuritySettings: SecuritySettings = {
|
||||
@@ -49,6 +50,7 @@ export function SecuritySettings() {
|
||||
defaultSettings={defaultSecuritySettings}
|
||||
defaultSection={SECURITY_DEFAULT_SECTION}
|
||||
getSectionContent={getSecuritySectionContent}
|
||||
getSectionMeta={getSecuritySectionMeta}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -26,7 +26,6 @@ const SECURITY_SECTIONS = [
|
||||
{
|
||||
id: 'rate-limit',
|
||||
titleKey: 'Rate Limiting',
|
||||
descriptionKey: 'Configure model request rate limiting',
|
||||
build: (settings: SecuritySettings) => (
|
||||
<RateLimitSection
|
||||
defaultValues={{
|
||||
@@ -44,7 +43,6 @@ const SECURITY_SECTIONS = [
|
||||
{
|
||||
id: 'sensitive-words',
|
||||
titleKey: 'Sensitive Words',
|
||||
descriptionKey: 'Configure sensitive word filtering',
|
||||
build: (settings: SecuritySettings) => (
|
||||
<SensitiveWordsSection
|
||||
defaultValues={{
|
||||
@@ -58,7 +56,6 @@ const SECURITY_SECTIONS = [
|
||||
{
|
||||
id: 'ssrf',
|
||||
titleKey: 'SSRF Protection',
|
||||
descriptionKey: 'Configure SSRF (Server-Side Request Forgery) protection',
|
||||
build: (settings: SecuritySettings) => (
|
||||
<SSRFSection
|
||||
defaultValues={{
|
||||
@@ -98,3 +95,4 @@ export const SECURITY_SECTION_IDS = securityRegistry.sectionIds
|
||||
export const SECURITY_DEFAULT_SECTION = securityRegistry.defaultSection
|
||||
export const getSecuritySectionNavItems = securityRegistry.getSectionNavItems
|
||||
export const getSecuritySectionContent = securityRegistry.getSectionContent
|
||||
export const getSecuritySectionMeta = securityRegistry.getSectionMeta
|
||||
|
||||
Reference in New Issue
Block a user