feat: modernize UI/UX to 2026 US fintech standard, add violet AI accents, and strengthen security controls
- Modern 2026 US fintech visual redesign across User & Admin Dashboards, Marketing pages, Auth screens, and Layouts - Introduced violet accent (#6D28D9 / #8B5CF6) strictly dedicated to AI capabilities (AI Daily Briefing, AI Assistant, Chatbot FAB & Chat UI) - Motion system respecting prefers-reduced-motion and (hover: none) with GPU-accelerated transforms & opacities - High-resolution dark glass monogram logo mark with upward growth motif - Backend security enhancements: strict MIME-type sniffing validation, admin assignment scoping assertions, safe document deletion handling - Nginx strict Content-Security-Policy (CSP) headers and favicon routing
This commit is contained in:
@@ -4,7 +4,7 @@ import { useSearchParams, Link } from 'react-router-dom';
|
||||
export default function VerifyEmail() {
|
||||
const [searchParams] = useSearchParams();
|
||||
const token = searchParams.get('token');
|
||||
|
||||
|
||||
const [status, setStatus] = useState('verifying'); // verifying, success, failed, invalid
|
||||
const [message, setMessage] = useState('');
|
||||
|
||||
@@ -19,16 +19,17 @@ export default function VerifyEmail() {
|
||||
const res = await fetch(`/api/auth/verify-email?token=${encodeURIComponent(token)}`);
|
||||
const data = await res.json();
|
||||
|
||||
if (res.ok && (data.message === "verified" || data.message === "already_verified")) {
|
||||
if (res.ok && (data.message === 'verified' || data.message === 'already_verified')) {
|
||||
setStatus('success');
|
||||
setMessage(data.message === "already_verified" ? "Already Verified" : "Email Verified!");
|
||||
setMessage(data.message === 'already_verified' ? 'Already Verified' : 'Email Verified!');
|
||||
} else {
|
||||
setStatus('failed');
|
||||
setMessage(data.detail || "This link is invalid or has expired.");
|
||||
setMessage(data.detail || 'This link is invalid or has expired.');
|
||||
}
|
||||
} catch (err) { console.error(err);
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
setStatus('failed');
|
||||
setMessage("Could not connect to the server. Please try again later.");
|
||||
setMessage('Could not connect to the server. Please try again later.');
|
||||
}
|
||||
};
|
||||
|
||||
@@ -37,34 +38,62 @@ export default function VerifyEmail() {
|
||||
|
||||
return (
|
||||
<div className="auth-shell page-enter">
|
||||
{/* Brand Side */}
|
||||
<div className="auth-brand">
|
||||
<img className="brand-logo" src="/images/bookkeeppro-logo.webp" alt="BookKeepPro"/>
|
||||
|
||||
<div style={{ textAlign: 'center', display: 'flex', flexDirection: 'column', alignItems: 'center' }}>
|
||||
<img
|
||||
src="/images/brand-logo-mark.webp"
|
||||
alt="ABC CPA & Advisory"
|
||||
style={{
|
||||
width: '58px',
|
||||
height: '58px',
|
||||
borderRadius: '14px',
|
||||
marginBottom: '16px',
|
||||
boxShadow: '0 8px 24px rgba(0, 0, 0, 0.45)',
|
||||
border: '1px solid rgba(255, 255, 255, 0.14)'
|
||||
}}
|
||||
width="58"
|
||||
height="58"
|
||||
/>
|
||||
<h2 style={{ fontFamily: "var(--font-display, 'Playfair Display', serif)", fontSize: '24px', fontWeight: 600, color: '#FFFFFF', margin: 0 }}>
|
||||
ABC CPA & Advisory
|
||||
</h2>
|
||||
<div style={{ fontSize: '11px', textTransform: 'uppercase', letterSpacing: '0.12em', color: '#60A5FA', marginTop: '6px' }}>
|
||||
Tax Advisory & Accounting Services
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="brand-divider"></div>
|
||||
<h2>Almost There</h2>
|
||||
<p>We're verifying your email address right now.</p>
|
||||
|
||||
<p>
|
||||
Verifying your secure portal identity to protect client confidentiality and tax documents.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{/* Form Side */}
|
||||
<div className="auth-form-side">
|
||||
<div className="auth-box text-center">
|
||||
|
||||
<div className="auth-box" style={{ textAlign: 'center' }}>
|
||||
{status === 'verifying' && (
|
||||
<>
|
||||
<div style={{fontSize:'48px', marginBottom:'16px'}}>
|
||||
<span className="material-symbols-outlined">pending</span>
|
||||
<div style={{ fontSize: '48px', marginBottom: '16px', color: '#047857' }}>
|
||||
<span className="material-symbols-outlined" style={{ fontSize: '48px' }}>pending</span>
|
||||
</div>
|
||||
<h2>Verifying your email...</h2>
|
||||
<p className="auth-subtitle">Please wait a moment.</p>
|
||||
<h1>Verifying your email...</h1>
|
||||
<p className="auth-subtitle">Please wait a moment while we authorize your credentials.</p>
|
||||
</>
|
||||
)}
|
||||
|
||||
{status === 'invalid' && (
|
||||
<>
|
||||
<div style={{fontSize:'48px', marginBottom:'16px'}}>
|
||||
<span className="material-symbols-outlined">cancel</span>
|
||||
<div style={{ fontSize: '48px', marginBottom: '16px', color: 'var(--error, #DC2626)' }}>
|
||||
<span className="material-symbols-outlined" style={{ fontSize: '48px' }}>cancel</span>
|
||||
</div>
|
||||
<h2>Invalid Link</h2>
|
||||
<p className="auth-subtitle">This verification link is missing a token.<br/>Please use the link from your email.</p>
|
||||
<Link to="/login" className="btn btn-primary" style={{borderRadius:'var(--radius-sm)', marginTop:'24px', display:'inline-flex'}}>
|
||||
<h1>Invalid Link</h1>
|
||||
<p className="auth-subtitle">
|
||||
This verification link is missing a token.<br />Please use the link from your registration email.
|
||||
</p>
|
||||
<Link to="/login" className="artha-pill-btn artha-pill-primary" style={{ marginTop: '20px' }}>
|
||||
Go to Sign In
|
||||
</Link>
|
||||
</>
|
||||
@@ -72,34 +101,33 @@ export default function VerifyEmail() {
|
||||
|
||||
{status === 'success' && (
|
||||
<>
|
||||
<div style={{fontSize:'48px', marginBottom:'16px', color:'var(--green)'}}>
|
||||
<span className="material-symbols-outlined">check_circle</span>
|
||||
<div style={{ fontSize: '48px', marginBottom: '16px', color: '#047857' }}>
|
||||
<span className="material-symbols-outlined" style={{ fontSize: '48px' }}>check_circle</span>
|
||||
</div>
|
||||
<h2>{message}</h2>
|
||||
<h1>{message}</h1>
|
||||
<p className="auth-subtitle">
|
||||
{message === "Already Verified"
|
||||
? "Your email is already verified. You can sign in below."
|
||||
: "Your email has been verified. You can now sign in to your account."}
|
||||
{message === 'Already Verified'
|
||||
? 'Your email is already verified. You can sign in below.'
|
||||
: 'Your email has been verified. You can now access your login portal.'}
|
||||
</p>
|
||||
<Link to="/login" className="btn btn-primary" style={{borderRadius:'var(--radius-sm)', marginTop:'24px', display:'inline-flex'}}>
|
||||
Sign In
|
||||
<Link to="/login" className="artha-pill-btn artha-pill-primary" style={{ marginTop: '20px' }}>
|
||||
Sign In to Portal
|
||||
</Link>
|
||||
</>
|
||||
)}
|
||||
|
||||
{status === 'failed' && (
|
||||
<>
|
||||
<div style={{fontSize:'48px', marginBottom:'16px', color:'var(--error)'}}>
|
||||
<span className="material-symbols-outlined">cancel</span>
|
||||
<div style={{ fontSize: '48px', marginBottom: '16px', color: 'var(--error, #DC2626)' }}>
|
||||
<span className="material-symbols-outlined" style={{ fontSize: '48px' }}>cancel</span>
|
||||
</div>
|
||||
<h2>Verification Failed</h2>
|
||||
<h1>Verification Failed</h1>
|
||||
<p className="auth-subtitle">{message}</p>
|
||||
<Link to="/resend-verification" className="btn btn-primary" style={{borderRadius:'var(--radius-sm)', marginTop:'24px', display:'inline-flex'}}>
|
||||
<Link to="/resend-verification" className="artha-pill-btn artha-pill-primary" style={{ marginTop: '20px' }}>
|
||||
Request New Link
|
||||
</Link>
|
||||
</>
|
||||
)}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user