Files
tabletten/components/AppLayout.tsx
T
admin 96043efe46 V 1.3.0 Anmeldung per Passkey (WebAuthn)
Passkey-Login wie in ausgaben-next/werte-next: auf der Login-Seite "Mit
Passkey anmelden", Verwaltung der eigenen Passkeys unter /einstellungen
(Button oben rechts). Das Passwort bleibt als Alternative bestehen.

- lib/webauthn.ts, lib/passkeys.ts sowie API-Routen unter /api/passkey
- proxy.ts: /api/passkey/authenticate ohne Session erreichbar
- Styles als eigene CSS-Klassen in globals.css (kein Tailwind in diesem
  Projekt), passend zum vorhandenen login-*/app-*-Schema
- Tabelle tabletten_passkeys in der DB medizin: app-spezifischer Name,
  damit sich Apps desselben Stacks nicht gegenseitig Passkeys anzeigen
  oder loeschen
- RP-Konfiguration ueber TABLETTEN_RP_*, da sich die .env auf dem Server
  mit anderen Apps teilt, die RP_ID/RP_ORIGIN bereits belegen

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-09 20:17:11 +02:00

56 lines
1.5 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
'use client';
import { useState } from 'react';
import Link from 'next/link';
import { usePathname } from 'next/navigation';
import LogoutButton from '@/components/LogoutButton';
import packageJson from '@/package.json';
interface AppLayoutProps {
children: React.ReactNode;
}
export default function AppLayout({ children }: AppLayoutProps) {
const pathname = usePathname();
const version = packageJson.version;
const [buildDate] = useState(() =>
process.env.NEXT_PUBLIC_BUILD_DATE || new Date().toLocaleDateString('de-DE', { day: '2-digit', month: '2-digit', year: 'numeric' })
);
return (
<div className="app-wrapper">
<div className="app-container">
{/* Seitentitel */}
<h1 className="app-title">Tabletten-Check</h1>
<div className="app-inner">
{/* Einstellungen und Logout oben rechts */}
<div className="app-logout-bar">
{pathname !== '/einstellungen' && (
<Link href="/einstellungen" className="btn-settings">
Einstellungen
</Link>
)}
<LogoutButton className="btn-logout" />
</div>
{/* Inhaltsbereich */}
<main className="app-main">
{children}
</main>
<footer className="app-footer">
<a href="mailto:rxf@gmx.de">
mailto:rxf@gmx.de
</a>
<div>Version {version} {buildDate}</div>
</footer>
</div>
</div>
</div>
);
}