feat: Set up initial monorepo structure for admin and mobile applications with core configurations and database integration.
This commit is contained in:
@@ -50,28 +50,29 @@ export default function LoginPage() {
|
||||
|
||||
return (
|
||||
<div className="min-h-screen bg-gray-50 flex items-center justify-center p-4">
|
||||
<div className="w-full max-w-md">
|
||||
<div className="w-full max-w-sm">
|
||||
{/* Logo */}
|
||||
<div className="text-center mb-8">
|
||||
<div className="inline-flex items-center justify-center w-16 h-16 bg-brand-500 rounded-2xl mb-4">
|
||||
<span className="text-white font-bold text-2xl">I</span>
|
||||
</div>
|
||||
<h1 className="text-2xl font-bold text-gray-900">InnungsApp Admin</h1>
|
||||
<p className="text-gray-500 mt-1">Verwaltungsportal für Innungen</p>
|
||||
<h1
|
||||
className="text-3xl font-bold text-gray-900 tracking-tight"
|
||||
style={{ fontFamily: "'Syne', system-ui, sans-serif" }}
|
||||
>
|
||||
Innungs<span className="text-brand-500">App</span>
|
||||
</h1>
|
||||
<p className="text-sm text-gray-500 mt-1">Verwaltungsportal für Innungen</p>
|
||||
</div>
|
||||
|
||||
<div className="bg-white rounded-2xl shadow-sm border p-8">
|
||||
<div className="bg-white rounded-lg border p-8">
|
||||
{sent ? (
|
||||
<div className="text-center">
|
||||
<div className="w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-4">
|
||||
<svg className="w-8 h-8 text-green-500" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="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" />
|
||||
<div className="text-center py-4">
|
||||
<div className="w-14 h-14 bg-green-50 border border-green-100 rounded-full flex items-center justify-center mx-auto mb-4">
|
||||
<svg className="w-7 h-7 text-green-500" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={1.5} d="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" />
|
||||
</svg>
|
||||
</div>
|
||||
<h2 className="text-xl font-semibold text-gray-900 mb-2">E-Mail gesendet!</h2>
|
||||
<p className="text-gray-500">
|
||||
Wir haben einen Login-Link an <strong>{email}</strong> gesendet.
|
||||
Bitte überprüfen Sie Ihr Postfach.
|
||||
<h2 className="text-lg font-semibold text-gray-900 mb-2">E-Mail gesendet</h2>
|
||||
<p className="text-sm text-gray-500">
|
||||
Login-Link an <strong className="text-gray-700">{email}</strong> gesendet. Bitte prüfen Sie Ihr Postfach.
|
||||
</p>
|
||||
<button
|
||||
onClick={() => setSent(false)}
|
||||
@@ -82,15 +83,22 @@ export default function LoginPage() {
|
||||
</div>
|
||||
) : (
|
||||
<>
|
||||
<h2 className="text-xl font-semibold text-gray-900 mb-6">Anmelden</h2>
|
||||
<h2
|
||||
className="text-lg font-semibold text-gray-900 mb-5"
|
||||
style={{ fontFamily: "'Syne', system-ui, sans-serif" }}
|
||||
>
|
||||
Anmelden
|
||||
</h2>
|
||||
|
||||
{/* Mode toggle */}
|
||||
<div className="flex rounded-lg border border-gray-200 p-1 mb-6">
|
||||
<div className="flex rounded-lg border border-gray-200 p-0.5 mb-5 bg-gray-50">
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setMode('password')}
|
||||
className={`flex-1 py-1.5 text-sm rounded-md font-medium transition-colors ${
|
||||
mode === 'password' ? 'bg-brand-500 text-white' : 'text-gray-500 hover:text-gray-700'
|
||||
className={`flex-1 py-1.5 text-sm rounded-md font-medium transition-all ${
|
||||
mode === 'password'
|
||||
? 'bg-white shadow-sm text-gray-900 border border-gray-200'
|
||||
: 'text-gray-500 hover:text-gray-700'
|
||||
}`}
|
||||
>
|
||||
Passwort
|
||||
@@ -98,8 +106,10 @@ export default function LoginPage() {
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setMode('magic')}
|
||||
className={`flex-1 py-1.5 text-sm rounded-md font-medium transition-colors ${
|
||||
mode === 'magic' ? 'bg-brand-500 text-white' : 'text-gray-500 hover:text-gray-700'
|
||||
className={`flex-1 py-1.5 text-sm rounded-md font-medium transition-all ${
|
||||
mode === 'magic'
|
||||
? 'bg-white shadow-sm text-gray-900 border border-gray-200'
|
||||
: 'text-gray-500 hover:text-gray-700'
|
||||
}`}
|
||||
>
|
||||
Magic Link
|
||||
@@ -108,7 +118,7 @@ export default function LoginPage() {
|
||||
|
||||
<form onSubmit={handleSubmit} className="space-y-4">
|
||||
<div>
|
||||
<label htmlFor="email" className="block text-sm font-medium text-gray-700 mb-1">
|
||||
<label htmlFor="email" className="block text-xs font-medium text-gray-600 mb-1 uppercase tracking-wide">
|
||||
E-Mail-Adresse
|
||||
</label>
|
||||
<input
|
||||
@@ -118,13 +128,13 @@ export default function LoginPage() {
|
||||
value={email}
|
||||
onChange={(e) => setEmail(e.target.value)}
|
||||
placeholder="admin@ihre-innung.de"
|
||||
className="w-full px-4 py-2.5 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-brand-500 focus:border-transparent"
|
||||
className="w-full px-3 py-2.5 border border-gray-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-brand-500 focus:border-transparent"
|
||||
/>
|
||||
</div>
|
||||
|
||||
{mode === 'password' && (
|
||||
<div>
|
||||
<label htmlFor="password" className="block text-sm font-medium text-gray-700 mb-1">
|
||||
<label htmlFor="password" className="block text-xs font-medium text-gray-600 mb-1 uppercase tracking-wide">
|
||||
Passwort
|
||||
</label>
|
||||
<input
|
||||
@@ -134,19 +144,19 @@ export default function LoginPage() {
|
||||
value={password}
|
||||
onChange={(e) => setPassword(e.target.value)}
|
||||
placeholder="••••••••"
|
||||
className="w-full px-4 py-2.5 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-brand-500 focus:border-transparent"
|
||||
className="w-full px-3 py-2.5 border border-gray-200 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-brand-500 focus:border-transparent"
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{error && (
|
||||
<p className="text-sm text-red-600 bg-red-50 px-4 py-2 rounded-lg">{error}</p>
|
||||
<p className="text-sm text-red-600 bg-red-50 px-3 py-2 rounded-lg">{error}</p>
|
||||
)}
|
||||
|
||||
<button
|
||||
type="submit"
|
||||
disabled={loading}
|
||||
className="w-full bg-brand-500 text-white py-2.5 px-4 rounded-lg font-medium hover:bg-brand-600 disabled:opacity-60 disabled:cursor-not-allowed transition-colors"
|
||||
className="w-full bg-brand-500 text-white py-2.5 px-4 rounded-lg text-sm font-medium hover:bg-brand-600 disabled:opacity-60 disabled:cursor-not-allowed transition-colors"
|
||||
>
|
||||
{loading
|
||||
? 'Bitte warten...'
|
||||
|
||||
Reference in New Issue
Block a user