feat(05-01): settings shell, header link, and i18n keys for dashboard phase

- Create settings/layout.tsx with SettingsSidebar and back-to-dashboard link
- Create settings/page.tsx with redirect to /settings/dashboard
- Create settings-sidebar.tsx with Widgets and Calendar nav items, aria-current
- Add Settings link in header user dropdown (gear icon, before logout)
- Add settings namespace (DE+EN) with all category and action keys
- Add widgets namespace (DE+EN) with all widget names, descriptions, error states
- Add header.settings key ("Einstellungen"/"Settings")

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-24 11:23:47 +02:00
parent d5e1c42e64
commit 8a9c1ae6a9
6 changed files with 231 additions and 0 deletions
@@ -0,0 +1,47 @@
'use client';
import Link from 'next/link';
import { useTranslations } from 'next-intl';
import { SettingsSidebar } from '@/components/settings/settings-sidebar';
/**
* Settings nested layout (D-19, D-20).
* Renders within the portal AppShell, adding its own sub-sidebar on the left.
* Back-to-dashboard link at top of content area per UI-SPEC.
*/
export default function SettingsLayout({
children,
}: {
children: React.ReactNode;
}) {
const t = useTranslations('settings');
return (
<div className="flex h-full">
<SettingsSidebar />
<div className="flex-1 overflow-y-auto p-6">
{/* Back to Dashboard link */}
<Link
href="/"
className="mb-4 inline-flex items-center gap-1 text-sm text-muted-foreground transition-colors hover:text-foreground"
>
<svg
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
>
<polyline points="15 18 9 12 15 6" />
</svg>
{t('backToDashboard')}
</Link>
{children}
</div>
</div>
);
}
@@ -0,0 +1,8 @@
import { redirect } from 'next/navigation';
/**
* Settings index page — redirects to /settings/dashboard (the default category).
*/
export default function SettingsPage() {
redirect('/settings/dashboard');
}