From b90aab82caaecaea8e20b7a9737a2e6a2a98c9fc Mon Sep 17 00:00:00 2001 From: frakarr Date: Fri, 9 Jan 2026 23:37:01 +0100 Subject: [PATCH] Update Login.tsx --- pages/Login.tsx | 61 +++++++++++++++++++++++++++++++++---------------- 1 file changed, 41 insertions(+), 20 deletions(-) diff --git a/pages/Login.tsx b/pages/Login.tsx index e0b2e79..6282c87 100644 --- a/pages/Login.tsx +++ b/pages/Login.tsx @@ -3,8 +3,13 @@ import React, { useState } from 'react'; import { useNavigate } from 'react-router-dom'; import { CondoService } from '../services/mockDb'; import { Building, Lock, Mail, AlertCircle } from 'lucide-react'; +import { BrandingConfig } from '../types'; -export const LoginPage: React.FC = () => { +interface LoginProps { + branding?: BrandingConfig; +} + +export const LoginPage: React.FC = ({ branding }) => { const [email, setEmail] = useState(''); const [password, setPassword] = useState(''); const [error, setError] = useState(''); @@ -26,30 +31,46 @@ export const LoginPage: React.FC = () => { } }; + const appName = branding?.appName || 'CondoPay'; + const logoUrl = branding?.logoUrl; + const bgUrl = branding?.loginBackgroundUrl; + return ( -
-
-
-
- +
+ {/* Dynamic Background */} + {bgUrl && ( +
+ Background +
-

CondoPay

-

Gestione Condominiale Semplice

+ )} + +
+
+
+ {logoUrl ? ( + Logo + ) : ( + + )} +
+

{appName}

+

Gestione Condominiale Semplice

-
+
{error && ( -
- +
+ {error}
)}
- +
-
+
{ required value={email} onChange={(e) => setEmail(e.target.value)} - className="block w-full pl-10 pr-3 py-2.5 border border-slate-300 rounded-lg focus:ring-blue-500 focus:border-blue-500 outline-none transition-all" + className="block w-full pl-11 pr-4 py-3 border border-slate-200 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-blue-500 outline-none transition-all text-slate-700 font-medium" placeholder="admin@condominio.it" />
- +
-
+
{ required value={password} onChange={(e) => setPassword(e.target.value)} - className="block w-full pl-10 pr-3 py-2.5 border border-slate-300 rounded-lg focus:ring-blue-500 focus:border-blue-500 outline-none transition-all" + className="block w-full pl-11 pr-4 py-3 border border-slate-200 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-blue-500 outline-none transition-all text-slate-700 font-medium" placeholder="••••••••" />
@@ -83,14 +104,14 @@ export const LoginPage: React.FC = () => { -
- © 2024 CondoPay Manager +
+ © {new Date().getFullYear()} {appName} Manager