From 484d528e683274f2f65f9c46773a76eb1c0853b1 Mon Sep 17 00:00:00 2001 From: Mayur Shinde Date: Tue, 16 Jun 2026 20:51:23 +0530 Subject: [PATCH] change layout/design of login page --- src/pages/Login.jsx | 224 ++++++++++++++++++++++++-------------------- 1 file changed, 120 insertions(+), 104 deletions(-) diff --git a/src/pages/Login.jsx b/src/pages/Login.jsx index cf7c7ec..5ffcd34 100644 --- a/src/pages/Login.jsx +++ b/src/pages/Login.jsx @@ -1,7 +1,7 @@ import React, { useState, useRef } from 'react'; import { useNavigate } from 'react-router-dom'; import { useAuth } from '../context/AuthContext'; -import { User, Briefcase, Lock, ArrowRight, AlertCircle, Eye, EyeOff } from 'lucide-react'; +import { User, Briefcase, Lock, ArrowRight, AlertCircle, Eye, EyeOff, Zap } from 'lucide-react'; import { SpotlightCard } from '../components/SpotlightCard'; import Logo from '../assets/images/LynkedUp_Pro_F_logo_Y.png'; @@ -178,7 +178,7 @@ const Login = () => { }; return ( -
+
{/* Subtle Ambient Background */}
@@ -215,107 +215,29 @@ const Login = () => { } `} -
- -
{/* ADJUSTED PADDING FOR MOBILE */} -
- LynkedUp Pro -

- Welcome Back -

-

Sign in to your LynkedUp Pro account

-
+
+ + {/* Header — full width across both panels */} +
+ LynkedUp Pro +

+ Welcome Back +

+

Sign in to your LynkedUp Pro account

+
- {/* Role Tabs — 3-col grid on mobile, 6-col on desktop */} -
- {[ - { key: 'customer', label: 'Customer' }, - { key: 'employee', label: 'Employee' }, - { key: 'owner', label: 'Owner' }, - { key: 'contractor', label: 'Contract.' }, - { key: 'vendor', label: 'Vendor' }, - { key: 'subcontractor', label: 'Sub-Con' }, - ].map(({ key, label }) => ( - - ))} -
- -
-
- -
-
- {loginType === 'customer' ? : } -
- setIdentifier(e.target.value)} - className="w-full bg-zinc-100 dark:bg-zinc-900/50 border border-zinc-200 dark:border-white/5 text-zinc-900 dark:text-white rounded-xl py-4 pl-12 pr-4 focus:outline-none focus:ring-1 focus:ring-black/10 dark:focus:ring-white/20 focus:bg-white dark:focus:bg-zinc-900 transition-all placeholder:text-zinc-400 dark:placeholder:text-zinc-700 font-medium relative z-0" - placeholder={loginType === 'employee' ? "e.g., LUP-1040" : "e.g., username"} - /> -
+ {/* Two-panel body: demo access + manual sign-in. + Mobile → stacked, demo access shown FIRST (above the form). + Desktop (lg) → side-by-side, sign-in left / demo access right. */} +
+ {/* Quick Demo Access — order-first on mobile so links are instantly visible */} +
+
+ +

Quick Demo Access

- -
-
- - -
-
-
- -
- setPassword(e.target.value)} - className="w-full bg-zinc-100 dark:bg-zinc-900/50 border border-zinc-200 dark:border-white/5 text-zinc-900 dark:text-white rounded-xl py-4 pl-12 pr-12 focus:outline-none focus:ring-1 focus:ring-black/10 dark:focus:ring-white/20 focus:bg-white dark:focus:bg-zinc-900 transition-all placeholder:text-zinc-400 dark:placeholder:text-zinc-700 font-medium relative z-0" - placeholder="Enter your password" - /> - -
-
- - {error && ( -
- - {error} -
- )} - - - Sign In - - - - - {/* Demo Quick Links — per-role person picker */} -
-

Quick Demo Access

-
+

Pick a role to sign in instantly — no password needed.

+
{Object.keys(DEMO_ACCOUNTS).map((roleKey) => { const styles = DEMO_ROLE_STYLES[roleKey] || DEMO_ROLE_STYLES.customer; const isExpanded = expandedDemoRole === roleKey; @@ -324,11 +246,11 @@ const Login = () => { ); @@ -336,7 +258,7 @@ const Login = () => {
{/* Person picker — expands below chips when a multi-person role is selected */} {expandedDemoRole && DEMO_ACCOUNTS[expandedDemoRole] && ( -
+
{DEMO_ACCOUNTS[expandedDemoRole].map((account) => (
)}
+ + {/* Manual sign-in */} +
+
+ +

Sign in with your account

+
+

Enter your username and password below.

+ {/* Role Tabs — 3-col grid (temporarily disabled) */} + {/*
+ {[ + { key: 'customer', label: 'Customer' }, + { key: 'employee', label: 'Employee' }, + { key: 'owner', label: 'Owner' }, + { key: 'contractor', label: 'Contract.' }, + { key: 'vendor', label: 'Vendor' }, + { key: 'subcontractor', label: 'Sub-Con' }, + ].map(({ key, label }) => ( + + ))} +
*/} + +
+
+ +
+
+ {loginType === 'customer' ? : } +
+ setIdentifier(e.target.value)} + className="w-full bg-zinc-100 dark:bg-zinc-900/50 border border-zinc-200 dark:border-white/5 text-zinc-900 dark:text-white rounded-xl py-2.5 sm:py-3 pl-12 pr-4 focus:outline-none focus:ring-1 focus:ring-black/10 dark:focus:ring-white/20 focus:bg-white dark:focus:bg-zinc-900 transition-all placeholder:text-zinc-400 dark:placeholder:text-zinc-700 font-medium relative z-0" + placeholder={loginType === 'employee' ? "e.g., LUP-1040" : "e.g., username"} + /> +
+
+ +
+
+ + +
+
+
+ +
+ setPassword(e.target.value)} + className="w-full bg-zinc-100 dark:bg-zinc-900/50 border border-zinc-200 dark:border-white/5 text-zinc-900 dark:text-white rounded-xl py-2.5 sm:py-3 pl-12 pr-12 focus:outline-none focus:ring-1 focus:ring-black/10 dark:focus:ring-white/20 focus:bg-white dark:focus:bg-zinc-900 transition-all placeholder:text-zinc-400 dark:placeholder:text-zinc-700 font-medium relative z-0" + placeholder="Enter your password" + /> + +
+
+ + {error && ( +
+ + {error} +
+ )} + + + Sign In + + +
+