V 1.2.0 Login-Fenster einbetten

This commit is contained in:
rxf
2026-03-04 09:54:07 +01:00
parent 88b475b0f3
commit 8c63a2b48a
2 changed files with 63 additions and 63 deletions

View File

@@ -7,23 +7,21 @@ export default function LoginPage() {
const [state, loginAction, isPending] = useActionState(login, undefined); const [state, loginAction, isPending] = useActionState(login, undefined);
return ( return (
<div className="min-h-screen flex items-center justify-center bg-gradient-to-br from-blue-50 to-indigo-100 dark:from-gray-900 dark:to-gray-800 px-4"> <div className="min-h-screen bg-white py-4 px-4">
<div className="max-w-md w-full space-y-8 bg-white dark:bg-gray-800 p-8 rounded-2xl shadow-xl"> <main className="max-w-6xl mx-auto border-2 border-black rounded-lg p-6 bg-[#FFFFDD]">
<div className="text-center"> <div className="flex justify-between items-center mb-6">
<h1 className="text-3xl font-bold text-gray-900 dark:text-white mb-2"> <h1 className="text-3xl font-bold">Werte - Log</h1>
Anmeldung
</h1>
<p className="text-gray-600 dark:text-gray-400">
Bitte melden Sie sich an, um fortzufahren
</p>
</div> </div>
<form action={loginAction} className="mt-8 space-y-6"> <div className="flex justify-center py-10">
<div className="space-y-4"> <div className="w-full max-w-sm bg-white border border-gray-300 rounded-xl shadow-md p-8">
<h2 className="text-xl font-semibold text-gray-900 mb-6 text-center">Anmeldung</h2>
<form action={loginAction} className="space-y-5">
<div> <div>
<label <label
htmlFor="username" htmlFor="username"
className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1" className="block text-sm font-medium text-gray-700 mb-1"
> >
Benutzername Benutzername
</label> </label>
@@ -33,7 +31,7 @@ export default function LoginPage() {
type="text" type="text"
required required
autoComplete="off" autoComplete="off"
className="appearance-none relative block w-full px-4 py-3 border border-gray-300 dark:border-gray-600 placeholder-gray-500 dark:placeholder-gray-400 text-gray-900 dark:text-white bg-white dark:bg-gray-700 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-colors" className="w-full px-3 py-2 border-2 border-gray-400 rounded-lg bg-white text-gray-900 focus:border-blue-500 focus:outline-none text-sm"
placeholder="Benutzername" placeholder="Benutzername"
disabled={isPending} disabled={isPending}
/> />
@@ -42,7 +40,7 @@ export default function LoginPage() {
<div> <div>
<label <label
htmlFor="password" htmlFor="password"
className="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1" className="block text-sm font-medium text-gray-700 mb-1"
> >
Passwort Passwort
</label> </label>
@@ -52,15 +50,14 @@ export default function LoginPage() {
type="password" type="password"
required required
autoComplete="new-password" autoComplete="new-password"
className="appearance-none relative block w-full px-4 py-3 border border-gray-300 dark:border-gray-600 placeholder-gray-500 dark:placeholder-gray-400 text-gray-900 dark:text-white bg-white dark:bg-gray-700 rounded-lg focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-colors" className="w-full px-3 py-2 border-2 border-gray-400 rounded-lg bg-white text-gray-900 focus:border-blue-500 focus:outline-none text-sm"
placeholder="Passwort" placeholder="Passwort"
disabled={isPending} disabled={isPending}
/> />
</div> </div>
</div>
{state?.error && ( {state?.error && (
<div className="bg-red-50 dark:bg-red-900/30 border border-red-200 dark:border-red-800 text-red-700 dark:text-red-300 px-4 py-3 rounded-lg text-sm"> <div className="bg-red-50 border border-red-300 text-red-700 px-3 py-2 rounded-lg text-sm">
{state.error} {state.error}
</div> </div>
)} )}
@@ -68,12 +65,15 @@ export default function LoginPage() {
<button <button
type="submit" type="submit"
disabled={isPending} disabled={isPending}
className="w-full flex justify-center py-3 px-4 border border-transparent text-sm font-semibold rounded-lg text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed transition-all duration-200 shadow-lg hover:shadow-xl" className="w-full py-2 px-4 bg-[#85B7D7] hover:bg-[#6a9fc5] text-black font-medium rounded-lg transition-colors disabled:opacity-50 disabled:cursor-not-allowed text-sm"
> >
{isPending ? 'Anmeldung läuft...' : 'Anmelden'} {isPending ? 'Anmeldung läuft...' : 'Anmelden'}
</button> </button>
</form> </form>
</div> </div>
</div> </div>
</main>
</div>
); );
} }

View File

@@ -1,6 +1,6 @@
{ {
"name": "werte_next", "name": "werte_next",
"version": "1.1.3", "version": "1.2.0",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "next dev", "dev": "next dev",