UI: Einstellungen+AuditLog aus Sidebar entfernt, AuditLog ins User-Menü, Suchfeld höher, Benachrichtigungs-Icon größer

This commit is contained in:
Agent Zero
2026-07-20 00:10:22 +02:00
parent 1d3b7a497b
commit beb4d7a9ff
5 changed files with 9 additions and 6 deletions
@@ -53,7 +53,6 @@ describe('AppShell', () => {
const sidebar = screen.getByTestId('sidebar'); const sidebar = screen.getByTestId('sidebar');
expect(within(sidebar).getByText('Dashboard')).toBeInTheDocument(); expect(within(sidebar).getByText('Dashboard')).toBeInTheDocument();
expect(within(sidebar).getByText('Kontakte')).toBeInTheDocument(); expect(within(sidebar).getByText('Kontakte')).toBeInTheDocument();
expect(within(sidebar).getByText('Einstellungen')).toBeInTheDocument();
}); });
it('topbar contains tenant switcher, search, notifications, and user menu', () => { it('topbar contains tenant switcher, search, notifications, and user menu', () => {
@@ -13,7 +13,6 @@ describe('Sidebar', () => {
); );
expect(screen.getByLabelText('Dashboard')).toBeInTheDocument(); expect(screen.getByLabelText('Dashboard')).toBeInTheDocument();
expect(screen.getByLabelText('Kontakte')).toBeInTheDocument(); expect(screen.getByLabelText('Kontakte')).toBeInTheDocument();
expect(screen.getByLabelText('Einstellungen')).toBeInTheDocument();
}); });
it('has navigation landmark with aria-label', () => { it('has navigation landmark with aria-label', () => {
@@ -23,8 +23,6 @@ const navItems: NavItem[] = [
{ to: '/dms', labelKey: 'nav.files', icon: navIcon('M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z') }, { to: '/dms', labelKey: 'nav.files', icon: navIcon('M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z') },
{ to: '/mail', labelKey: 'nav.email', icon: navIcon('M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z') }, { to: '/mail', labelKey: 'nav.email', icon: navIcon('M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z') },
{ to: '/ai-assistant', labelKey: 'nav.aiAssistant', icon: navIcon('M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z') }, { to: '/ai-assistant', labelKey: 'nav.aiAssistant', icon: navIcon('M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z') },
{ to: '/settings', labelKey: 'nav.settings', icon: navIcon('M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z') },
{ to: '/audit-log', labelKey: 'nav.auditLog', icon: navIcon('M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z') },
]; ];
export function Sidebar() { export function Sidebar() {
+8 -1
View File
@@ -99,7 +99,7 @@ export function TopBar() {
aria-label={t('topbar.notifications')} aria-label={t('topbar.notifications')}
aria-expanded={notifOpen} aria-expanded={notifOpen}
> >
<svg className="w-4 h-4 text-secondary-600" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true"> <svg className="w-5 h-5 text-secondary-600" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true">
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9" /> <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9" />
</svg> </svg>
<Badge variant="danger" className="absolute -top-1 -right-1 px-1.5 py-0">{notifications.length}</Badge> <Badge variant="danger" className="absolute -top-1 -right-1 px-1.5 py-0">{notifications.length}</Badge>
@@ -166,6 +166,13 @@ export function TopBar() {
> >
{t('topbar.settings')} {t('topbar.settings')}
</button> </button>
<button
onClick={() => { setUserMenuOpen(false); navigate('/audit-log'); }}
className="w-full text-left px-3 py-2 text-sm hover:bg-secondary-50 min-h-touch focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-500"
role="menuitem"
>
{t('nav.auditLog')}
</button>
<button <button
onClick={handleLogout} onClick={handleLogout}
className="w-full text-left px-3 py-2 text-sm text-danger-600 hover:bg-danger-50 min-h-touch focus:outline-none focus-visible:ring-2 focus-visible:ring-danger-500" className="w-full text-left px-3 py-2 text-sm text-danger-600 hover:bg-danger-50 min-h-touch focus:outline-none focus-visible:ring-2 focus-visible:ring-danger-500"
@@ -89,7 +89,7 @@ export function SearchDropdown({ placeholder }: SearchDropdownProps) {
onFocus={() => query && setOpen(true)} onFocus={() => query && setOpen(true)}
onKeyDown={handleKeyDown} onKeyDown={handleKeyDown}
placeholder={placeholder || t('topbar.search')} placeholder={placeholder || t('topbar.search')}
className="w-64 pl-10 pr-3 py-1 text-xs rounded-md border border-secondary-300 focus:outline-none focus:ring-2 focus:ring-primary-500" className="w-64 pl-10 pr-3 py-1.5 text-sm rounded-md border border-secondary-300 focus:outline-none focus:ring-2 focus:ring-primary-500 min-h-touch"
aria-label={t('topbar.search')} aria-label={t('topbar.search')}
role="combobox" role="combobox"
aria-expanded={open} aria-expanded={open}