Implemented a sophisticated cyber-intelligence visual design with: DESIGN DIRECTION: - "Tactical Intelligence Command Center" aesthetic - Typography: JetBrains Mono for data/code + Outfit for UI labels - Color Palette: Deep navy (#0A0E27) base with electric cyan (#00D9FF) accents - Visual Language: Grid patterns, glowing borders, scanning animations - Motion: Smooth fade-ins, pulse effects, hover transformations FRONTEND CHANGES: - Redesigned App.css with comprehensive intelligence dashboard theme - Custom CSS classes: intel-card, intel-button, intel-input, status-badge - Added scanning line animations and pulse glow effects - Implemented grid background pattern and scrollbar styling COMPONENT UPDATES: - App.js: Transformed all UI sections to intel theme - Header with stats dashboard - Search/filter cards - CVE list with expandable cards - Document management - Quick check interface - JIRA ticket tracking - LoginForm.js: Redesigned authentication portal - All modals: Add/Edit CVE, Add/Edit JIRA tickets UI FEATURES: - Monospace fonts for technical data - Glowing accent borders on interactive elements - Status badges with animated pulse indicators - Data rows with hover states - Responsive grid layouts - Modal overlays with backdrop blur TECHNICAL: - Tailwind CSS extended with custom intel theme - Google Fonts: JetBrains Mono & Outfit - Maintained all existing functionality - Build tested successfully - No breaking changes to business logic Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
111 lines
5.1 KiB
JavaScript
111 lines
5.1 KiB
JavaScript
import React, { useState } from 'react';
|
|
import { AlertCircle, Lock, User } from 'lucide-react';
|
|
import { useAuth } from '../contexts/AuthContext';
|
|
|
|
export default function LoginForm() {
|
|
const [username, setUsername] = useState('');
|
|
const [password, setPassword] = useState('');
|
|
const [loading, setLoading] = useState(false);
|
|
const [error, setError] = useState('');
|
|
const { login } = useAuth();
|
|
|
|
const handleSubmit = async (e) => {
|
|
e.preventDefault();
|
|
setError('');
|
|
setLoading(true);
|
|
|
|
const result = await login(username, password);
|
|
|
|
if (!result.success) {
|
|
setError(result.error);
|
|
}
|
|
|
|
setLoading(false);
|
|
};
|
|
|
|
return (
|
|
<div className="min-h-screen bg-intel-darkest grid-bg flex items-center justify-center p-4 relative overflow-hidden fade-in">
|
|
{/* Scanning line effect */}
|
|
<div className="scan-line"></div>
|
|
|
|
<div className="intel-card rounded-lg shadow-2xl max-w-md w-full p-8 border-intel-accent relative z-10">
|
|
<div className="text-center mb-8">
|
|
<div className="w-16 h-16 bg-gradient-to-br from-intel-accent to-intel-accent-dim rounded-full flex items-center justify-center mx-auto mb-4 shadow-lg" style={{boxShadow: '0 0 30px rgba(0, 217, 255, 0.4)'}}>
|
|
<Lock className="w-8 h-8 text-intel-darkest" />
|
|
</div>
|
|
<h1 className="text-3xl font-bold text-intel-accent font-mono tracking-tight">CVE INTEL</h1>
|
|
<p className="text-gray-400 mt-2 font-sans text-sm">Threat Intelligence Access Portal</p>
|
|
</div>
|
|
|
|
{error && (
|
|
<div className="mb-6 p-4 bg-intel-danger/10 border border-intel-danger/30 rounded flex items-start gap-3">
|
|
<AlertCircle className="w-5 h-5 text-intel-danger flex-shrink-0 mt-0.5" />
|
|
<p className="text-sm text-gray-300">{error}</p>
|
|
</div>
|
|
)}
|
|
|
|
<form onSubmit={handleSubmit} className="space-y-6">
|
|
<div>
|
|
<label htmlFor="username" className="block text-xs font-medium text-gray-400 mb-2 uppercase tracking-wider">
|
|
Username
|
|
</label>
|
|
<div className="relative">
|
|
<User className="w-5 h-5 text-gray-500 absolute left-3 top-1/2 transform -translate-y-1/2" />
|
|
<input
|
|
id="username"
|
|
type="text"
|
|
required
|
|
value={username}
|
|
onChange={(e) => setUsername(e.target.value)}
|
|
className="intel-input w-full pl-10"
|
|
placeholder="Enter username"
|
|
disabled={loading}
|
|
/>
|
|
</div>
|
|
</div>
|
|
|
|
<div>
|
|
<label htmlFor="password" className="block text-xs font-medium text-gray-400 mb-2 uppercase tracking-wider">
|
|
Password
|
|
</label>
|
|
<div className="relative">
|
|
<Lock className="w-5 h-5 text-gray-500 absolute left-3 top-1/2 transform -translate-y-1/2" />
|
|
<input
|
|
id="password"
|
|
type="password"
|
|
required
|
|
value={password}
|
|
onChange={(e) => setPassword(e.target.value)}
|
|
className="intel-input w-full pl-10"
|
|
placeholder="Enter password"
|
|
disabled={loading}
|
|
/>
|
|
</div>
|
|
</div>
|
|
|
|
<button
|
|
type="submit"
|
|
disabled={loading}
|
|
className="w-full intel-button intel-button-primary py-3 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2"
|
|
>
|
|
{loading ? (
|
|
<>
|
|
<div className="loading-spinner w-5 h-5"></div>
|
|
<span className="font-mono uppercase tracking-wider">Authenticating...</span>
|
|
</>
|
|
) : (
|
|
<span className="font-mono uppercase tracking-wider">Access System</span>
|
|
)}
|
|
</button>
|
|
</form>
|
|
|
|
<div className="mt-6 pt-6 border-t border-intel-grid">
|
|
<p className="text-sm text-gray-500 text-center font-mono">
|
|
Default: <span className="text-intel-accent">admin</span> / <span className="text-intel-accent">admin123</span>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|