feat: improve admin login UI and sidebar branding
- Login page: split layout with gradient panel (desktop) + form, ProsApp logo mark, feature list, consistent blue brand colors - Sidebar: replace plain text with logo mark + brand name Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
7783cac3fe
commit
a5c1dd7c33
@@ -5,7 +5,6 @@ import { useAuth } from '@/lib/auth';
|
|||||||
import { useRouter } from 'next/navigation';
|
import { useRouter } from 'next/navigation';
|
||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import { Input } from '@/components/ui/input';
|
import { Input } from '@/components/ui/input';
|
||||||
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card';
|
|
||||||
import { Toaster } from '@/components/ui/sonner';
|
import { Toaster } from '@/components/ui/sonner';
|
||||||
import { toast } from 'sonner';
|
import { toast } from 'sonner';
|
||||||
|
|
||||||
@@ -30,21 +29,85 @@ export default function LoginPage() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex h-screen items-center justify-center bg-muted/30">
|
<div className="flex min-h-screen">
|
||||||
<Card className="w-full max-w-sm">
|
{/* Left panel — gradient */}
|
||||||
<CardHeader>
|
<div className="hidden lg:flex lg:w-1/2 flex-col items-center justify-center bg-gradient-to-br from-[#42A4EF] to-[#1565C0] text-white p-12">
|
||||||
<CardTitle className="text-center">ProsApp Admin</CardTitle>
|
<div className="mb-6 flex h-20 w-20 items-center justify-center rounded-2xl bg-white/20 backdrop-blur-sm">
|
||||||
</CardHeader>
|
<span className="text-4xl font-black text-white">P</span>
|
||||||
<CardContent>
|
</div>
|
||||||
|
<h1 className="text-4xl font-black tracking-tight">ProsApp</h1>
|
||||||
|
<p className="mt-3 text-lg text-white/80">Panel de administración</p>
|
||||||
|
<div className="mt-12 space-y-4 text-sm text-white/70 max-w-xs">
|
||||||
|
<div className="flex items-center gap-3">
|
||||||
|
<div className="h-1.5 w-1.5 rounded-full bg-white/60" />
|
||||||
|
<span>Gestión de usuarios y profesionales</span>
|
||||||
|
</div>
|
||||||
|
<div className="flex items-center gap-3">
|
||||||
|
<div className="h-1.5 w-1.5 rounded-full bg-white/60" />
|
||||||
|
<span>Control de servicios y estados</span>
|
||||||
|
</div>
|
||||||
|
<div className="flex items-center gap-3">
|
||||||
|
<div className="h-1.5 w-1.5 rounded-full bg-white/60" />
|
||||||
|
<span>Reseñas, ciudades y profesiones</span>
|
||||||
|
</div>
|
||||||
|
<div className="flex items-center gap-3">
|
||||||
|
<div className="h-1.5 w-1.5 rounded-full bg-white/60" />
|
||||||
|
<span>Configuración de SMS y notificaciones</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Right panel — form */}
|
||||||
|
<div className="flex w-full lg:w-1/2 flex-col items-center justify-center bg-background px-8 py-12">
|
||||||
|
<div className="w-full max-w-sm space-y-8">
|
||||||
|
{/* Logo for mobile */}
|
||||||
|
<div className="flex flex-col items-center lg:hidden">
|
||||||
|
<div className="mb-3 flex h-14 w-14 items-center justify-center rounded-xl bg-[#42A4EF]">
|
||||||
|
<span className="text-2xl font-black text-white">P</span>
|
||||||
|
</div>
|
||||||
|
<h1 className="text-2xl font-black text-[#42A4EF]">ProsApp</h1>
|
||||||
|
<p className="text-sm text-muted-foreground">Panel de administración</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<h2 className="text-2xl font-bold">Iniciar sesión</h2>
|
||||||
|
<p className="mt-1 text-sm text-muted-foreground">Ingresa tus credenciales de administrador</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
<form onSubmit={handleSubmit} className="space-y-4">
|
<form onSubmit={handleSubmit} className="space-y-4">
|
||||||
<Input placeholder="Email" type="email" value={email} onChange={(e) => setEmail(e.target.value)} required />
|
<div className="space-y-2">
|
||||||
<Input placeholder="Contraseña" type="password" value={password} onChange={(e) => setPassword(e.target.value)} required />
|
<label className="text-sm font-medium">Email</label>
|
||||||
<Button type="submit" className="w-full" disabled={loading}>
|
<Input
|
||||||
|
placeholder="admin@prosapp.co"
|
||||||
|
type="email"
|
||||||
|
value={email}
|
||||||
|
onChange={(e) => setEmail(e.target.value)}
|
||||||
|
required
|
||||||
|
className="h-11"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="space-y-2">
|
||||||
|
<label className="text-sm font-medium">Contraseña</label>
|
||||||
|
<Input
|
||||||
|
placeholder="••••••••"
|
||||||
|
type="password"
|
||||||
|
value={password}
|
||||||
|
onChange={(e) => setPassword(e.target.value)}
|
||||||
|
required
|
||||||
|
className="h-11"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<Button
|
||||||
|
type="submit"
|
||||||
|
className="w-full h-11 bg-[#42A4EF] hover:bg-[#1565C0] text-white font-semibold"
|
||||||
|
disabled={loading}
|
||||||
|
>
|
||||||
{loading ? 'Ingresando...' : 'Ingresar'}
|
{loading ? 'Ingresando...' : 'Ingresar'}
|
||||||
</Button>
|
</Button>
|
||||||
</form>
|
</form>
|
||||||
</CardContent>
|
</div>
|
||||||
</Card>
|
</div>
|
||||||
|
|
||||||
<Toaster />
|
<Toaster />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -50,7 +50,19 @@ export default function Sidebar({ children }: { children: React.ReactNode }) {
|
|||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<div className="flex h-14 items-center justify-between border-b px-3">
|
<div className="flex h-14 items-center justify-between border-b px-3">
|
||||||
{!collapsed && <span className="font-semibold">ProsApp Admin</span>}
|
{!collapsed && (
|
||||||
|
<div className="flex items-center gap-2">
|
||||||
|
<div className="flex h-7 w-7 items-center justify-center rounded-lg bg-[#42A4EF]">
|
||||||
|
<span className="text-xs font-black text-white">P</span>
|
||||||
|
</div>
|
||||||
|
<span className="font-bold text-[#42A4EF]">ProsApp</span>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{collapsed && (
|
||||||
|
<div className="flex h-7 w-7 items-center justify-center rounded-lg bg-[#42A4EF] mx-auto">
|
||||||
|
<span className="text-xs font-black text-white">P</span>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
<Button variant="ghost" size="icon" onClick={() => setCollapsed(!collapsed)}>
|
<Button variant="ghost" size="icon" onClick={() => setCollapsed(!collapsed)}>
|
||||||
{collapsed ? <Menu size={18} /> : <ChevronLeft size={18} />}
|
{collapsed ? <Menu size={18} /> : <ChevronLeft size={18} />}
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
Reference in New Issue
Block a user