All checks were successful
Build & Publish / publish (push) Successful in 43s
- Fix critical --bg-base token bug (dark mode broken), replace with --bg-surface - Replace hand-rolled admin nav with Tabs composite (proper ARIA) - Migrate AuditLog from custom table to DataTable with sorting, row accents, card wrapper - Remove duplicate h2 page titles (breadcrumb + tab already identify the page) - Rework user creation with provider-aware form (Local/OIDC RadioGroup) - Add Security section with password reset for local users, OIDC info for external - Add toast notifications to all RBAC mutations (create/delete/add/remove) - Add confirmation dialogs for cascading removals (group/role) - Add keyboard accessibility to entity lists (role/tabIndex/aria-selected) - Add empty search states, duplicate name validation - Replace lock emoji with Badge, fix radii/shadow/padding consistency - Badge dashed variant keeps background color - Inherited roles shown with dashed outline + reduced opacity - Inline MultiSelect (+Add) for groups, roles, members, child groups - Center OIDC form, replace inline styles with CSS modules Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
46 lines
1.3 KiB
TypeScript
46 lines
1.3 KiB
TypeScript
import { useNavigate, useLocation } from 'react-router-dom'
|
|
import { AppShell } from '../../design-system/layout/AppShell/AppShell'
|
|
import { Sidebar } from '../../design-system/layout/Sidebar/Sidebar'
|
|
import { TopBar } from '../../design-system/layout/TopBar/TopBar'
|
|
import { Tabs } from '../../design-system/composites/Tabs/Tabs'
|
|
import { SIDEBAR_APPS } from '../../mocks/sidebar'
|
|
import styles from './Admin.module.css'
|
|
import type { ReactNode } from 'react'
|
|
|
|
const ADMIN_TABS = [
|
|
{ label: 'User Management', value: '/admin/rbac' },
|
|
{ label: 'Audit Log', value: '/admin/audit' },
|
|
{ label: 'OIDC', value: '/admin/oidc' },
|
|
]
|
|
|
|
interface AdminLayoutProps {
|
|
title: string
|
|
children: ReactNode
|
|
}
|
|
|
|
export function AdminLayout({ title, children }: AdminLayoutProps) {
|
|
const navigate = useNavigate()
|
|
const location = useLocation()
|
|
|
|
return (
|
|
<AppShell sidebar={<Sidebar apps={SIDEBAR_APPS} />}>
|
|
<TopBar
|
|
breadcrumb={[
|
|
{ label: 'Admin', href: '/admin' },
|
|
{ label: title },
|
|
]}
|
|
environment="PRODUCTION"
|
|
user={{ name: 'hendrik' }}
|
|
/>
|
|
<Tabs
|
|
tabs={ADMIN_TABS}
|
|
active={location.pathname}
|
|
onChange={(path) => navigate(path)}
|
|
/>
|
|
<div className={styles.adminContent}>
|
|
{children}
|
|
</div>
|
|
</AppShell>
|
|
)
|
|
}
|