Transform CVE Dashboard to tactical intelligence platform aesthetic
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>
This commit is contained in:
@@ -3,6 +3,8 @@
|
|||||||
## Role
|
## Role
|
||||||
You are the frontend specialist for the CVE Dashboard project. You build and maintain the React UI, handle client-side state, manage API communication, and implement user-facing features.
|
You are the frontend specialist for the CVE Dashboard project. You build and maintain the React UI, handle client-side state, manage API communication, and implement user-facing features.
|
||||||
|
|
||||||
|
**IMPORTANT:** When creating new UI components or implementing frontend features, you should use the `frontend-design` skill to ensure production-grade, distinctive design quality. Invoke this skill using the Skill tool with `skill: "frontend-design"`.
|
||||||
|
|
||||||
## Project Context
|
## Project Context
|
||||||
|
|
||||||
### Tech Stack
|
### Tech Stack
|
||||||
|
|||||||
25
.claude/instructions.md
Normal file
25
.claude/instructions.md
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
# Project Instructions
|
||||||
|
|
||||||
|
## Token Usage & Efficiency
|
||||||
|
Follow the guidelines in `.claude/optimization.md` for:
|
||||||
|
- When to use subagents vs main conversation
|
||||||
|
- Model selection (Haiku vs Sonnet)
|
||||||
|
- Token preservation strategies
|
||||||
|
- Rate limiting rules
|
||||||
|
|
||||||
|
## Project Context
|
||||||
|
This is a CVE (Common Vulnerabilities and Exposures) dashboard application for tracking security vulnerabilities, vendors, and JIRA tickets.
|
||||||
|
|
||||||
|
## Security Focus
|
||||||
|
All code changes should consider:
|
||||||
|
- Input validation
|
||||||
|
- SQL injection prevention
|
||||||
|
- XSS protection
|
||||||
|
- Authentication/authorization
|
||||||
|
|
||||||
|
## Frontend Development
|
||||||
|
When working on frontend features or UI components:
|
||||||
|
- Use the `frontend-design` skill for new component creation and UI implementation
|
||||||
|
- This skill provides production-grade design quality and avoids generic AI aesthetics
|
||||||
|
- Invoke it using: `Skill` tool with `skill: "frontend-design"`
|
||||||
|
- The skill will guide implementation with distinctive, polished code patterns
|
||||||
143
.claude/optimization.md
Normal file
143
.claude/optimization.md
Normal file
@@ -0,0 +1,143 @@
|
|||||||
|
OPTIMIZATION.md - Token Usage & Subagent Strategy
|
||||||
|
|
||||||
|
## SUBAGENT USAGE STRATEGY
|
||||||
|
|
||||||
|
Subagents run in separate contexts and preserve main conversation tokens.
|
||||||
|
|
||||||
|
### When to Use Subagents
|
||||||
|
|
||||||
|
**Use Subagents for:**
|
||||||
|
- Large-scale codebase exploration and analysis
|
||||||
|
- Complex multi-step investigations across many files
|
||||||
|
- Detailed code pattern searches and refactoring analysis
|
||||||
|
- Gathering comprehensive information before main conversation work
|
||||||
|
- When total tokens would exceed 30,000 in main conversation
|
||||||
|
|
||||||
|
**Keep in Main Conversation:**
|
||||||
|
- Direct file edits (1-3 files)
|
||||||
|
- Simple code changes and debugging
|
||||||
|
- Architecture decisions
|
||||||
|
- Security reviews and approvals
|
||||||
|
- User-facing responses and recommendations
|
||||||
|
- Questions requiring reasoning about codebase
|
||||||
|
- Frontend UI work (use `frontend-design` skill for new components)
|
||||||
|
|
||||||
|
### Subagent Types & When to Use
|
||||||
|
|
||||||
|
**Explore Agent** (Haiku 3.5)
|
||||||
|
- Codebase exploration and file discovery
|
||||||
|
- Pattern searching across large codebases
|
||||||
|
- Gathering information about file structure
|
||||||
|
- Finding references and relationships
|
||||||
|
|
||||||
|
**General-Purpose Agent** (Haiku 3.5)
|
||||||
|
- Multi-step code analysis tasks
|
||||||
|
- Summarizing findings from exploration
|
||||||
|
- Complex searches requiring multiple strategies
|
||||||
|
- Collecting data for main conversation decisions
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## MODEL SELECTION STRATEGY
|
||||||
|
|
||||||
|
### Main Conversation (Sonnet 4.5)
|
||||||
|
- **Always use Sonnet 4.5 in main conversation**
|
||||||
|
- Direct file edits and modifications
|
||||||
|
- Architecture and design decisions
|
||||||
|
- Security analysis and approvals
|
||||||
|
- Complex reasoning and recommendations
|
||||||
|
- Final user responses
|
||||||
|
|
||||||
|
### Subagent Models
|
||||||
|
|
||||||
|
**Haiku 4.5** (Default for subagents)
|
||||||
|
- Code exploration and pattern searching
|
||||||
|
- File discovery and structure analysis
|
||||||
|
- Simple codebase investigations
|
||||||
|
- Gathering information and summarizing
|
||||||
|
- Task: Use Haiku first for subagent work
|
||||||
|
|
||||||
|
**Sonnet 4.5** (For subagents - when needed)
|
||||||
|
- Security-critical analysis within subagents
|
||||||
|
- Complex architectural decisions needed in exploration
|
||||||
|
- High-risk code analysis
|
||||||
|
- When exploration requires advanced reasoning
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## RATE LIMITING GUIDANCE
|
||||||
|
|
||||||
|
### API Call Throttling
|
||||||
|
- 5 seconds minimum between API calls
|
||||||
|
- 10 seconds minimum between web searches
|
||||||
|
- Batch similar work whenever possible
|
||||||
|
- If you hit 429 error: STOP and wait 5 minutes
|
||||||
|
|
||||||
|
### Budget Management
|
||||||
|
- Track tokens used across all agents
|
||||||
|
- Main conversation should stay under 100,000 tokens
|
||||||
|
- Subagent work can extend to 50,000 tokens per agent
|
||||||
|
- Batch multiple subagent tasks together when possible
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## TOKEN PRESERVATION RULES
|
||||||
|
|
||||||
|
### Best Practices for Long-Running Conversations
|
||||||
|
|
||||||
|
**In Main Conversation:**
|
||||||
|
1. Start with subagent for exploration (saves ~20,000 tokens)
|
||||||
|
2. Request subagent summarize findings
|
||||||
|
3. Use summary to inform main conversation edits/decisions
|
||||||
|
4. Keep main conversation focused on decisions and actions
|
||||||
|
|
||||||
|
**Information Gathering:**
|
||||||
|
- Use subagents to explore before asking for analysis in main conversation
|
||||||
|
- Have subagent provide condensed summaries (250-500 words max)
|
||||||
|
- Main conversation uses summary + provides feedback/decisions
|
||||||
|
|
||||||
|
**File Editing:**
|
||||||
|
- For <3 files: Keep in main conversation
|
||||||
|
- For 3+ files: Split between subagent (finding/analysis) and main (approval/execution)
|
||||||
|
- Simple edits (1-5 lines per file): Main conversation
|
||||||
|
- Complex refactoring (10+ lines per file): Subagent analysis + main approval
|
||||||
|
|
||||||
|
**Code Review Workflow:**
|
||||||
|
1. Subagent explores and analyzes code patterns
|
||||||
|
2. Subagent flags issues and suggests improvements
|
||||||
|
3. Main conversation reviews suggestions
|
||||||
|
4. Main conversation executes approved changes
|
||||||
|
|
||||||
|
### Token Budget Allocation Example
|
||||||
|
- Main conversation: 0-100,000 tokens (soft limit)
|
||||||
|
- Per subagent task: 0-50,000 tokens
|
||||||
|
- Critical work (security): Use Sonnet in main conversation
|
||||||
|
- Exploratory work: Use Explore agent (Haiku) in subagent
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## DECISION TREE
|
||||||
|
|
||||||
|
```
|
||||||
|
Is this a direct file edit request?
|
||||||
|
├─ YES (1-3 files, <10 lines each) → Main conversation
|
||||||
|
├─ NO
|
||||||
|
└─ Is this exploratory analysis?
|
||||||
|
├─ YES (finding files, patterns) → Use Explore agent (Haiku)
|
||||||
|
├─ NO
|
||||||
|
└─ Is this complex multi-step work?
|
||||||
|
├─ YES (3+ steps, many files) → Use General agent (Haiku)
|
||||||
|
├─ NO
|
||||||
|
└─ Is this security-critical?
|
||||||
|
├─ YES → Main conversation (Sonnet)
|
||||||
|
└─ NO → Subagent (Haiku) or Main conversation
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## SUMMARY
|
||||||
|
|
||||||
|
**Main Conversation (You):** Architecture, decisions, edits, reviews
|
||||||
|
**Subagents:** Exploration, analysis, information gathering
|
||||||
|
**Sonnet 4.5:** Security, complexity, final decisions
|
||||||
|
**Haiku 4.5:** Exploration, gathering, analysis support
|
||||||
@@ -25,9 +25,67 @@
|
|||||||
Learn how to configure a non-root public URL by running `npm run build`.
|
Learn how to configure a non-root public URL by running `npm run build`.
|
||||||
-->
|
-->
|
||||||
<title>CVE Dashboard</title>
|
<title>CVE Dashboard</title>
|
||||||
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Outfit:wght@300;400;500;600;700&display=swap" rel="stylesheet">
|
||||||
<script src="https://cdn.tailwindcss.com"></script>
|
<script src="https://cdn.tailwindcss.com"></script>
|
||||||
|
<script>
|
||||||
|
tailwind.config = {
|
||||||
|
theme: {
|
||||||
|
extend: {
|
||||||
|
fontFamily: {
|
||||||
|
'mono': ['JetBrains Mono', 'monospace'],
|
||||||
|
'sans': ['Outfit', 'system-ui', 'sans-serif'],
|
||||||
|
},
|
||||||
|
colors: {
|
||||||
|
'intel': {
|
||||||
|
'darkest': '#0A0E27',
|
||||||
|
'dark': '#131937',
|
||||||
|
'medium': '#1E2749',
|
||||||
|
'accent': '#00D9FF',
|
||||||
|
'accent-dim': '#0099BB',
|
||||||
|
'danger': '#FF3366',
|
||||||
|
'warning': '#FFB800',
|
||||||
|
'success': '#00FF88',
|
||||||
|
'grid': '#1E2749',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
backgroundImage: {
|
||||||
|
'grid-pattern': 'linear-gradient(rgba(0, 217, 255, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(0, 217, 255, 0.03) 1px, transparent 1px)',
|
||||||
|
},
|
||||||
|
backgroundSize: {
|
||||||
|
'grid': '20px 20px',
|
||||||
|
},
|
||||||
|
animation: {
|
||||||
|
'scan': 'scan 3s ease-in-out infinite',
|
||||||
|
'pulse-glow': 'pulse-glow 2s ease-in-out infinite',
|
||||||
|
'fade-in': 'fade-in 0.5s ease-out',
|
||||||
|
'slide-up': 'slide-up 0.4s ease-out',
|
||||||
|
},
|
||||||
|
keyframes: {
|
||||||
|
'scan': {
|
||||||
|
'0%, 100%': { transform: 'translateY(-100%)', opacity: '0' },
|
||||||
|
'50%': { transform: 'translateY(100%)', opacity: '0.3' },
|
||||||
|
},
|
||||||
|
'pulse-glow': {
|
||||||
|
'0%, 100%': { boxShadow: '0 0 5px rgba(0, 217, 255, 0.3)' },
|
||||||
|
'50%': { boxShadow: '0 0 20px rgba(0, 217, 255, 0.6)' },
|
||||||
|
},
|
||||||
|
'fade-in': {
|
||||||
|
'0%': { opacity: '0' },
|
||||||
|
'100%': { opacity: '1' },
|
||||||
|
},
|
||||||
|
'slide-up': {
|
||||||
|
'0%': { transform: 'translateY(10px)', opacity: '0' },
|
||||||
|
'100%': { transform: 'translateY(0)', opacity: '1' },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body class="bg-intel-darkest">
|
||||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
<!--
|
<!--
|
||||||
|
|||||||
@@ -1,38 +1,390 @@
|
|||||||
.App {
|
/* Tactical Intelligence Dashboard Styles */
|
||||||
text-align: center;
|
|
||||||
|
* {
|
||||||
|
font-family: 'Outfit', system-ui, sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
.App-logo {
|
body {
|
||||||
height: 40vmin;
|
background-color: #0A0E27;
|
||||||
|
color: #E4E8F1;
|
||||||
|
overflow-x: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Grid background effect */
|
||||||
|
.grid-bg {
|
||||||
|
background-image:
|
||||||
|
linear-gradient(rgba(0, 217, 255, 0.03) 1px, transparent 1px),
|
||||||
|
linear-gradient(90deg, rgba(0, 217, 255, 0.03) 1px, transparent 1px);
|
||||||
|
background-size: 20px 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Monospace font for technical data */
|
||||||
|
.mono {
|
||||||
|
font-family: 'JetBrains Mono', monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Glowing border effect */
|
||||||
|
.glow-border {
|
||||||
|
position: relative;
|
||||||
|
border: 1px solid rgba(0, 217, 255, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.glow-border::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
top: -1px;
|
||||||
|
left: -1px;
|
||||||
|
right: -1px;
|
||||||
|
bottom: -1px;
|
||||||
|
background: linear-gradient(45deg, transparent, rgba(0, 217, 255, 0.1), transparent);
|
||||||
|
border-radius: inherit;
|
||||||
|
opacity: 0;
|
||||||
|
transition: opacity 0.3s;
|
||||||
|
pointer-events: none;
|
||||||
|
z-index: -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.glow-border:hover::before {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Scanning line animation */
|
||||||
|
.scan-line {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
height: 2px;
|
||||||
|
background: linear-gradient(90deg,
|
||||||
|
transparent,
|
||||||
|
rgba(0, 217, 255, 0.8),
|
||||||
|
transparent
|
||||||
|
);
|
||||||
|
animation: scan 3s ease-in-out infinite;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (prefers-reduced-motion: no-preference) {
|
@keyframes scan {
|
||||||
.App-logo {
|
0%, 100% {
|
||||||
animation: App-logo-spin infinite 20s linear;
|
transform: translateY(-100%);
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
transform: translateY(2000%);
|
||||||
|
opacity: 0.5;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.App-header {
|
/* Card hover effects */
|
||||||
background-color: #282c34;
|
.intel-card {
|
||||||
min-height: 100vh;
|
background: linear-gradient(135deg, #131937 0%, #1E2749 100%);
|
||||||
display: flex;
|
border: 1px solid rgba(0, 217, 255, 0.1);
|
||||||
flex-direction: column;
|
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.intel-card::after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: -100%;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: linear-gradient(90deg,
|
||||||
|
transparent,
|
||||||
|
rgba(0, 217, 255, 0.05),
|
||||||
|
transparent
|
||||||
|
);
|
||||||
|
transition: left 0.5s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.intel-card:hover {
|
||||||
|
border-color: rgba(0, 217, 255, 0.4);
|
||||||
|
transform: translateY(-2px);
|
||||||
|
box-shadow: 0 8px 24px rgba(0, 217, 255, 0.15);
|
||||||
|
}
|
||||||
|
|
||||||
|
.intel-card:hover::after {
|
||||||
|
left: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Status badges with glow */
|
||||||
|
.status-badge {
|
||||||
|
position: relative;
|
||||||
|
font-family: 'JetBrains Mono', monospace;
|
||||||
|
font-size: 0.75rem;
|
||||||
|
font-weight: 600;
|
||||||
|
letter-spacing: 0.5px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
padding: 0.25rem 0.75rem;
|
||||||
|
border-radius: 0.25rem;
|
||||||
|
border: 1px solid;
|
||||||
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
gap: 0.5rem;
|
||||||
font-size: calc(10px + 2vmin);
|
|
||||||
color: white;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.App-link {
|
.status-badge::before {
|
||||||
color: #61dafb;
|
content: '';
|
||||||
|
width: 6px;
|
||||||
|
height: 6px;
|
||||||
|
border-radius: 50%;
|
||||||
|
animation: pulse-glow 2s ease-in-out infinite;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes App-logo-spin {
|
.status-critical {
|
||||||
|
background: rgba(255, 51, 102, 0.1);
|
||||||
|
border-color: rgba(255, 51, 102, 0.4);
|
||||||
|
color: #FF3366;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-critical::before {
|
||||||
|
background: #FF3366;
|
||||||
|
box-shadow: 0 0 10px #FF3366;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-high {
|
||||||
|
background: rgba(255, 184, 0, 0.1);
|
||||||
|
border-color: rgba(255, 184, 0, 0.4);
|
||||||
|
color: #FFB800;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-high::before {
|
||||||
|
background: #FFB800;
|
||||||
|
box-shadow: 0 0 10px #FFB800;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-medium {
|
||||||
|
background: rgba(0, 217, 255, 0.1);
|
||||||
|
border-color: rgba(0, 217, 255, 0.4);
|
||||||
|
color: #00D9FF;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-medium::before {
|
||||||
|
background: #00D9FF;
|
||||||
|
box-shadow: 0 0 10px #00D9FF;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-low {
|
||||||
|
background: rgba(0, 255, 136, 0.1);
|
||||||
|
border-color: rgba(0, 255, 136, 0.4);
|
||||||
|
color: #00FF88;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-low::before {
|
||||||
|
background: #00FF88;
|
||||||
|
box-shadow: 0 0 10px #00FF88;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Button styles */
|
||||||
|
.intel-button {
|
||||||
|
position: relative;
|
||||||
|
font-family: 'JetBrains Mono', monospace;
|
||||||
|
font-weight: 600;
|
||||||
|
letter-spacing: 0.5px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
font-size: 0.875rem;
|
||||||
|
padding: 0.625rem 1.25rem;
|
||||||
|
border-radius: 0.375rem;
|
||||||
|
transition: all 0.3s;
|
||||||
|
border: 1px solid;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.intel-button::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: rgba(255, 255, 255, 0.1);
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
transition: width 0.5s, height 0.5s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.intel-button:hover::before {
|
||||||
|
width: 300px;
|
||||||
|
height: 300px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.intel-button-primary {
|
||||||
|
background: rgba(0, 217, 255, 0.15);
|
||||||
|
border-color: #00D9FF;
|
||||||
|
color: #00D9FF;
|
||||||
|
}
|
||||||
|
|
||||||
|
.intel-button-primary:hover {
|
||||||
|
background: rgba(0, 217, 255, 0.25);
|
||||||
|
box-shadow: 0 0 20px rgba(0, 217, 255, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.intel-button-danger {
|
||||||
|
background: rgba(255, 51, 102, 0.15);
|
||||||
|
border-color: #FF3366;
|
||||||
|
color: #FF3366;
|
||||||
|
}
|
||||||
|
|
||||||
|
.intel-button-danger:hover {
|
||||||
|
background: rgba(255, 51, 102, 0.25);
|
||||||
|
box-shadow: 0 0 20px rgba(255, 51, 102, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.intel-button-success {
|
||||||
|
background: rgba(0, 255, 136, 0.15);
|
||||||
|
border-color: #00FF88;
|
||||||
|
color: #00FF88;
|
||||||
|
}
|
||||||
|
|
||||||
|
.intel-button-success:hover {
|
||||||
|
background: rgba(0, 255, 136, 0.25);
|
||||||
|
box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Input fields */
|
||||||
|
.intel-input {
|
||||||
|
background: rgba(19, 25, 55, 0.5);
|
||||||
|
border: 1px solid rgba(0, 217, 255, 0.2);
|
||||||
|
color: #E4E8F1;
|
||||||
|
padding: 0.625rem 1rem;
|
||||||
|
border-radius: 0.375rem;
|
||||||
|
font-family: 'JetBrains Mono', monospace;
|
||||||
|
font-size: 0.875rem;
|
||||||
|
transition: all 0.3s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.intel-input:focus {
|
||||||
|
outline: none;
|
||||||
|
border-color: #00D9FF;
|
||||||
|
box-shadow: 0 0 0 2px rgba(0, 217, 255, 0.1);
|
||||||
|
background: rgba(19, 25, 55, 0.8);
|
||||||
|
}
|
||||||
|
|
||||||
|
.intel-input::placeholder {
|
||||||
|
color: rgba(228, 232, 241, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Stat cards */
|
||||||
|
.stat-card {
|
||||||
|
background: linear-gradient(135deg, rgba(19, 25, 55, 0.8) 0%, rgba(30, 39, 73, 0.6) 100%);
|
||||||
|
border: 1px solid rgba(0, 217, 255, 0.15);
|
||||||
|
border-radius: 0.5rem;
|
||||||
|
padding: 1rem;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stat-card::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
height: 2px;
|
||||||
|
background: linear-gradient(90deg, transparent, #00D9FF, transparent);
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Modal overlay */
|
||||||
|
.modal-overlay {
|
||||||
|
background: rgba(10, 14, 39, 0.95);
|
||||||
|
backdrop-filter: blur(8px);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Scrollbar styling */
|
||||||
|
::-webkit-scrollbar {
|
||||||
|
width: 8px;
|
||||||
|
height: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-track {
|
||||||
|
background: #131937;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-thumb {
|
||||||
|
background: rgba(0, 217, 255, 0.3);
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-thumb:hover {
|
||||||
|
background: rgba(0, 217, 255, 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Fade in animation */
|
||||||
|
.fade-in {
|
||||||
|
animation: fade-in 0.5s ease-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes fade-in {
|
||||||
from {
|
from {
|
||||||
transform: rotate(0deg);
|
opacity: 0;
|
||||||
|
transform: translateY(10px);
|
||||||
}
|
}
|
||||||
to {
|
to {
|
||||||
transform: rotate(360deg);
|
opacity: 1;
|
||||||
|
transform: translateY(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Pulse glow animation */
|
||||||
|
@keyframes pulse-glow {
|
||||||
|
0%, 100% {
|
||||||
|
box-shadow: 0 0 5px currentColor;
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
box-shadow: 0 0 15px currentColor;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Data table styling */
|
||||||
|
.data-row {
|
||||||
|
border-bottom: 1px solid rgba(0, 217, 255, 0.05);
|
||||||
|
transition: all 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.data-row:hover {
|
||||||
|
background: rgba(0, 217, 255, 0.03);
|
||||||
|
border-bottom-color: rgba(0, 217, 255, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Loading spinner */
|
||||||
|
.loading-spinner {
|
||||||
|
border: 2px solid rgba(0, 217, 255, 0.1);
|
||||||
|
border-top-color: #00D9FF;
|
||||||
|
border-radius: 50%;
|
||||||
|
animation: spin 1s linear infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes spin {
|
||||||
|
to { transform: rotate(360deg); }
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Tooltip */
|
||||||
|
.tooltip {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tooltip::after {
|
||||||
|
content: attr(data-tooltip);
|
||||||
|
position: absolute;
|
||||||
|
bottom: 100%;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
padding: 0.5rem 0.75rem;
|
||||||
|
background: #1E2749;
|
||||||
|
border: 1px solid rgba(0, 217, 255, 0.3);
|
||||||
|
border-radius: 0.25rem;
|
||||||
|
font-size: 0.75rem;
|
||||||
|
white-space: nowrap;
|
||||||
|
opacity: 0;
|
||||||
|
pointer-events: none;
|
||||||
|
transition: opacity 0.3s;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
font-family: 'JetBrains Mono', monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tooltip:hover::after {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
|||||||
import React, { useState } from 'react';
|
import React, { useState } from 'react';
|
||||||
import { Loader, AlertCircle, Lock, User } from 'lucide-react';
|
import { AlertCircle, Lock, User } from 'lucide-react';
|
||||||
import { useAuth } from '../contexts/AuthContext';
|
import { useAuth } from '../contexts/AuthContext';
|
||||||
|
|
||||||
export default function LoginForm() {
|
export default function LoginForm() {
|
||||||
@@ -24,57 +24,60 @@ export default function LoginForm() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="min-h-screen bg-gray-100 flex items-center justify-center p-4">
|
<div className="min-h-screen bg-intel-darkest grid-bg flex items-center justify-center p-4 relative overflow-hidden fade-in">
|
||||||
<div className="bg-white rounded-lg shadow-xl max-w-md w-full p-8">
|
{/* 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="text-center mb-8">
|
||||||
<div className="w-16 h-16 bg-[#0476D9] rounded-full flex items-center justify-center mx-auto mb-4">
|
<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-white" />
|
<Lock className="w-8 h-8 text-intel-darkest" />
|
||||||
</div>
|
</div>
|
||||||
<h1 className="text-2xl font-bold text-gray-900">CVE Dashboard</h1>
|
<h1 className="text-3xl font-bold text-intel-accent font-mono tracking-tight">CVE INTEL</h1>
|
||||||
<p className="text-gray-600 mt-2">Sign in to access the dashboard</p>
|
<p className="text-gray-400 mt-2 font-sans text-sm">Threat Intelligence Access Portal</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{error && (
|
{error && (
|
||||||
<div className="mb-6 p-4 bg-red-50 border border-red-200 rounded-lg flex items-start gap-3">
|
<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-red-600 flex-shrink-0 mt-0.5" />
|
<AlertCircle className="w-5 h-5 text-intel-danger flex-shrink-0 mt-0.5" />
|
||||||
<p className="text-sm text-red-700">{error}</p>
|
<p className="text-sm text-gray-300">{error}</p>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<form onSubmit={handleSubmit} className="space-y-6">
|
<form onSubmit={handleSubmit} className="space-y-6">
|
||||||
<div>
|
<div>
|
||||||
<label htmlFor="username" className="block text-sm font-medium text-gray-700 mb-2">
|
<label htmlFor="username" className="block text-xs font-medium text-gray-400 mb-2 uppercase tracking-wider">
|
||||||
Username
|
Username
|
||||||
</label>
|
</label>
|
||||||
<div className="relative">
|
<div className="relative">
|
||||||
<User className="w-5 h-5 text-gray-400 absolute left-3 top-1/2 transform -translate-y-1/2" />
|
<User className="w-5 h-5 text-gray-500 absolute left-3 top-1/2 transform -translate-y-1/2" />
|
||||||
<input
|
<input
|
||||||
id="username"
|
id="username"
|
||||||
type="text"
|
type="text"
|
||||||
required
|
required
|
||||||
value={username}
|
value={username}
|
||||||
onChange={(e) => setUsername(e.target.value)}
|
onChange={(e) => setUsername(e.target.value)}
|
||||||
className="w-full pl-10 pr-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-[#0476D9] focus:border-transparent"
|
className="intel-input w-full pl-10"
|
||||||
placeholder="Enter your username"
|
placeholder="Enter username"
|
||||||
disabled={loading}
|
disabled={loading}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<label htmlFor="password" className="block text-sm font-medium text-gray-700 mb-2">
|
<label htmlFor="password" className="block text-xs font-medium text-gray-400 mb-2 uppercase tracking-wider">
|
||||||
Password
|
Password
|
||||||
</label>
|
</label>
|
||||||
<div className="relative">
|
<div className="relative">
|
||||||
<Lock className="w-5 h-5 text-gray-400 absolute left-3 top-1/2 transform -translate-y-1/2" />
|
<Lock className="w-5 h-5 text-gray-500 absolute left-3 top-1/2 transform -translate-y-1/2" />
|
||||||
<input
|
<input
|
||||||
id="password"
|
id="password"
|
||||||
type="password"
|
type="password"
|
||||||
required
|
required
|
||||||
value={password}
|
value={password}
|
||||||
onChange={(e) => setPassword(e.target.value)}
|
onChange={(e) => setPassword(e.target.value)}
|
||||||
className="w-full pl-10 pr-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-[#0476D9] focus:border-transparent"
|
className="intel-input w-full pl-10"
|
||||||
placeholder="Enter your password"
|
placeholder="Enter password"
|
||||||
disabled={loading}
|
disabled={loading}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -83,22 +86,22 @@ export default function LoginForm() {
|
|||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
disabled={loading}
|
disabled={loading}
|
||||||
className="w-full py-3 bg-[#0476D9] text-white rounded-lg hover:bg-[#0360B8] transition-colors font-medium shadow-md disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2"
|
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 ? (
|
{loading ? (
|
||||||
<>
|
<>
|
||||||
<Loader className="w-5 h-5 animate-spin" />
|
<div className="loading-spinner w-5 h-5"></div>
|
||||||
Signing in...
|
<span className="font-mono uppercase tracking-wider">Authenticating...</span>
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
'Sign In'
|
<span className="font-mono uppercase tracking-wider">Access System</span>
|
||||||
)}
|
)}
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div className="mt-6 pt-6 border-t border-gray-200">
|
<div className="mt-6 pt-6 border-t border-intel-grid">
|
||||||
<p className="text-sm text-gray-500 text-center">
|
<p className="text-sm text-gray-500 text-center font-mono">
|
||||||
Default admin credentials: admin / admin123
|
Default: <span className="text-intel-accent">admin</span> / <span className="text-intel-accent">admin123</span>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user