✨ 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:
@@ -16,10 +16,12 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
import { cn } from '@/lib/utils'
|
||||
import { useSuppressSettingsSectionHeader } from './settings-page-context'
|
||||
|
||||
type SettingsSectionProps = {
|
||||
title: string
|
||||
titleProps?: React.HTMLAttributes<HTMLHeadingElement>
|
||||
description?: string
|
||||
children: React.ReactNode
|
||||
className?: string
|
||||
}
|
||||
@@ -27,32 +29,23 @@ type SettingsSectionProps = {
|
||||
export function SettingsSection({
|
||||
title,
|
||||
titleProps,
|
||||
description,
|
||||
children,
|
||||
className,
|
||||
}: SettingsSectionProps) {
|
||||
const baseClassName = 'space-y-4'
|
||||
const sectionClassName = className
|
||||
? `${baseClassName} ${className}`
|
||||
: baseClassName
|
||||
const suppressHeader = useSuppressSettingsSectionHeader()
|
||||
|
||||
return (
|
||||
<section className={sectionClassName}>
|
||||
<div className='space-y-1'>
|
||||
<h3
|
||||
{...titleProps}
|
||||
className={
|
||||
titleProps?.className
|
||||
? `text-base font-semibold ${titleProps.className}`
|
||||
: 'text-base font-semibold'
|
||||
}
|
||||
>
|
||||
{title}
|
||||
</h3>
|
||||
{description && (
|
||||
<p className='text-muted-foreground text-sm'>{description}</p>
|
||||
)}
|
||||
</div>
|
||||
<section className={cn('flex flex-col gap-4', className)}>
|
||||
{!suppressHeader && (
|
||||
<div className='flex flex-col gap-1'>
|
||||
<h3
|
||||
{...titleProps}
|
||||
className={cn('text-base font-semibold', titleProps?.className)}
|
||||
>
|
||||
{title}
|
||||
</h3>
|
||||
</div>
|
||||
)}
|
||||
{children}
|
||||
</section>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user