Files
familienarchiv/frontend/src/app.d.ts
Marcel d816e94a90 feat(auth): migrate frontend from username to email-only authentication
- Login page: email input replaces username field (type=email, name=email)
- Login server action: reads email, uses i18n error for missing credentials
- AccountSection: email input (type=email) replaces username text field
- New user server action: sends email as required field, drops username
- UsersListPanel: displays and searches by email instead of username
- Admin edit user page: heading and delete confirm use email
- Profile page: fullName fallback uses email, drops @username display
- app.d.ts: email required on User, username removed
- Generated API types: AppUser.email required, username removed; CreateUserRequest.email required, username removed
- i18n: login_label_email, login_error_missing_credentials, admin_col_login updated (de/en/es)
- errors.ts: MISSING_CREDENTIALS → login_error_missing_credentials

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 23:36:55 +02:00

33 lines
569 B
TypeScript

// src/app.d.ts
declare global {
namespace App {
// Define the User structure matching your Java Entity
interface User {
id: string;
firstName?: string;
lastName?: string;
birthDate?: string;
email: string;
contact?: string;
groups: {
id: string;
name: string;
permissions: string[];
}[];
enabled: boolean;
createdAt: string;
}
interface Locals {
user?: User; // locals.user is optional (undefined if not logged in)
}
interface PageData {
user?: User; // Available in $page.data.user
}
}
}
export {};