Fix auth form errors and redirects: Add React keys/useEffects for error rendering and scroll, Inertia::location in controllers for SPA navigation, extend RegistrationTest and add E2E. Update docs (changes/2025-10-02-registration-fixes.md, prp/13-backend-authentication.md). Add new UI components (accordion, carousel, progress, table, tabs), marketing/legal pages (Blog, Kontakt, Datenschutz, etc.), fonts, user migration (remove_name), views/css/package updates, seeders/factories.

This commit is contained in:
Codex Agent
2025-10-02 11:40:48 +02:00
parent 1945f664c6
commit 7475210893
101 changed files with 3406 additions and 376 deletions

View File

@@ -0,0 +1,80 @@
import React from 'react';
import { usePage, router } from '@inertiajs/react';
import { Head } from '@inertiajs/react';
import MarketingLayout from '@/layouts/marketing/MarketingLayout';
import { Loader } from 'lucide-react';
const Success: React.FC = () => {
const { auth, flash } = usePage().props as any;
if (auth.user && auth.user.email_verified_at) {
// Redirect to admin
router.visit('/admin', { preserveState: false });
return (
<div className="flex items-center justify-center min-h-screen bg-gray-50">
<div className="text-center">
<Loader className="animate-spin inline-block w-8 h-8 border border-2 border-blue-600 border-t-transparent rounded-full mx-auto mb-2" />
<p className="text-gray-600">Wird weitergeleitet...</p>
</div>
</div>
);
}
if (auth.user && !auth.user.email_verified_at) {
return (
<MarketingLayout title="E-Mail verifizieren">
<div className="min-h-screen flex items-center justify-center bg-gray-50 py-12 px-4 sm:px-6 lg:px-8">
<div className="max-w-md w-full bg-white rounded-lg shadow-md p-8">
<div className="text-center">
<h2 className="text-2xl font-bold text-gray-900 mb-4">
E-Mail verifizieren
</h2>
<p className="text-gray-600 mb-6">
Bitte überprüfen Sie Ihre E-Mail und klicken Sie auf den Verifizierungslink.
</p>
<form method="POST" action="/email/verification-notification">
<button
type="submit"
className="bg-blue-600 hover:bg-blue-700 text-white px-6 py-2 rounded-md font-medium transition duration-300"
>
Verifizierung erneut senden
</button>
</form>
<p className="mt-4 text-sm text-gray-600">
Bereits registriert? <a href="/login" className="text-blue-600 hover:text-blue-500">Anmelden</a>
</p>
</div>
</div>
</div>
</MarketingLayout>
);
}
return (
<MarketingLayout title="Kauf abschließen">
<div className="min-h-screen flex items-center justify-center bg-gray-50 py-12 px-4 sm:px-6 lg:px-8">
<div className="max-w-md w-full bg-white rounded-lg shadow-md p-8">
<div className="text-center">
<h2 className="text-2xl font-bold text-gray-900 mb-4">
Kauf abschließen
</h2>
<p className="text-gray-600 mb-6">
Melden Sie sich an, um fortzufahren.
</p>
<a
href="/login"
className="bg-blue-600 hover:bg-blue-700 text-white px-6 py-2 rounded-md font-medium transition duration-300 block mb-2"
>
Anmelden
</a>
<p className="text-sm text-gray-600">
Kein Konto? <a href="/register" className="text-blue-600 hover:text-blue-500">Registrieren</a>
</p>
</div>
</div>
</div>
</MarketingLayout>
);
};
export default Success;