Files
Charon/frontend/src/pages/Settings.tsx
GitHub Actions 8f2f18edf7 feat: implement modern UI/UX design system (#409)
- Add comprehensive design token system (colors, typography, spacing)
- Create 12 new UI components with Radix UI primitives
- Add layout components (PageShell, StatsCard, EmptyState, DataTable)
- Polish all pages with new component library
- Improve accessibility with WCAG 2.1 compliance
- Add dark mode support with semantic color tokens
- Update 947 tests to match new UI patterns

Closes #409
2025-12-16 21:21:39 +00:00

53 lines
1.7 KiB
TypeScript

import { Link, Outlet, useLocation } from 'react-router-dom'
import { PageShell } from '../components/layout/PageShell'
import { cn } from '../utils/cn'
import { Settings as SettingsIcon, Server, Mail, User } from 'lucide-react'
export default function Settings() {
const location = useLocation()
const isActive = (path: string) => location.pathname === path
const navItems = [
{ path: '/settings/system', label: 'System', icon: Server },
{ path: '/settings/smtp', label: 'Email (SMTP)', icon: Mail },
{ path: '/settings/account', label: 'Account', icon: User },
]
return (
<PageShell
title="Settings"
description="Configure your Charon instance"
actions={
<div className="flex items-center gap-2 text-content-muted">
<SettingsIcon className="h-5 w-5" />
</div>
}
>
{/* Tab Navigation */}
<nav className="flex items-center gap-1 p-1 bg-surface-subtle rounded-lg w-fit">
{navItems.map(({ path, label, icon: Icon }) => (
<Link
key={path}
to={path}
className={cn(
'flex items-center gap-2 px-4 py-2 rounded-md text-sm font-medium transition-all duration-fast',
isActive(path)
? 'bg-surface-elevated text-content-primary shadow-sm'
: 'text-content-secondary hover:text-content-primary hover:bg-surface-muted'
)}
>
<Icon className="h-4 w-4" />
{label}
</Link>
))}
</nav>
{/* Content Area */}
<div className="bg-surface-elevated border border-border rounded-lg p-6">
<Outlet />
</div>
</PageShell>
)
}