Spaces:
No application file
No application file
File size: 8,198 Bytes
91994bf | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 | import React from 'react';
import { useNavigate } from 'react-router-dom';
interface LabCardProps {
title: string;
description: string;
icon: string;
path: string;
color: string;
status?: string;
}
const LabCard: React.FC<LabCardProps> = ({ title, description, icon, path, color, status }) => {
const navigate = useNavigate();
return (
<div
onClick={() => navigate(path)}
style={{
background: 'rgba(255, 255, 255, 0.03)',
backdropFilter: 'blur(10px)',
border: `1px solid ${color}44`,
borderRadius: '16px',
padding: '24px',
cursor: 'pointer',
transition: 'all 0.3s cubic-bezier(0.4, 0, 0.2, 1)',
display: 'flex',
flexDirection: 'column',
gap: '12px',
position: 'relative',
overflow: 'hidden'
}}
className="lab-card"
>
<div style={{
fontSize: '40px',
marginBottom: '8px'
}}>{icon}</div>
<h3 style={{
margin: 0,
color: 'white',
fontSize: '1.5rem',
fontWeight: '600'
}}>{title}</h3>
<p style={{
margin: 0,
color: '#aaa',
fontSize: '0.9rem',
lineHeight: '1.5'
}}>{description}</p>
{status && (
<div style={{
position: 'absolute',
top: '12px',
right: '12px',
fontSize: '10px',
background: `${color}22`,
color: color,
padding: '2px 8px',
borderRadius: '10px',
textTransform: 'uppercase',
letterSpacing: '1px',
border: `1px solid ${color}44`
}}>
{status}
</div>
)}
<div style={{
marginTop: 'auto',
color: color,
fontSize: '0.8rem',
fontWeight: 'bold',
display: 'flex',
alignItems: 'center',
gap: '4px'
}}>
INITIATE PROTOCOL →
</div>
{/* Hover Glint Effect */}
<div className="card-glint" />
</div>
);
};
const LabSelector: React.FC = () => {
const labs: LabCardProps[] = [
{
title: "Chemistry Lab",
description: "Advanced molecular design, synthesis planning, and reaction kinetics simulation.",
icon: "🧪",
path: "/lab/chemistry",
color: "#646cff",
status: "High Fidelity"
},
{
title: "Oncology Lab",
description: "Specialized hub for medicinal discovery, drug responses, and tumor modeling.",
icon: "🔬",
path: "/lab/oncology",
color: "#ff4444",
status: "Experimental"
},
{
title: "Materials Lab",
description: "Crystal lattice engineering, structural stress analysis, and property prediction.",
icon: "🧱",
path: "/lab/materials",
color: "#ffaa00",
status: "High Fidelity"
},
{
title: "Physics Lab",
description: "Classical and fluid dynamics simulations with real-time particle tracking.",
icon: "⚛️",
path: "/lab/physics",
color: "#00d4ff",
status: "Stable"
},
{
title: "Propulsion Lab",
description: "Hot-fire testing and aerospace engineering for deep-space transport.",
icon: "🚀",
path: "/lab/propulsion",
color: "#ff4500",
status: "Active"
},
{
title: "Astro Lab",
description: "Spectral analysis and orbital mechanics in high-fidelity star systems.",
icon: "✨",
path: "/lab/astro",
color: "#00ffff",
status: "Active"
}
];
return (
<div style={{
minHeight: '100%',
width: '100%',
background: 'linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%)',
padding: '60px 20px',
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
overflowY: 'auto'
}}>
<header style={{ textAlign: 'center', marginBottom: '60px' }}>
<h1 style={{
fontSize: '3.5rem',
margin: 0,
background: 'linear-gradient(to right, #fff, #666)',
WebkitBackgroundClip: 'text',
WebkitTextFillColor: 'transparent',
fontWeight: '800'
}}>QULAB INFINITE</h1>
<p style={{ color: '#888', fontSize: '1.2rem', marginTop: '10px' }}>
Select a facility to begin autonomous invention and discovery.
</p>
</header>
<div style={{
display: 'grid',
gridTemplateColumns: 'repeat(auto-fill, minmax(320px, 1fr))',
gap: '30px',
width: '100%',
maxWidth: '1200px'
}}>
{labs.map((lab, index) => (
<LabCard key={index} {...lab} />
))}
</div>
<div style={{
marginTop: '80px',
padding: '30px',
background: 'rgba(255,255,255,0.02)',
borderRadius: '20px',
border: '1px solid rgba(255,255,255,0.05)',
width: '100%',
maxWidth: '1000px',
textAlign: 'center'
}}>
<h2 style={{ color: '#fff', fontSize: '1.8rem' }}>Meta-Orchestration</h2>
<p style={{ color: '#aaa', marginBottom: '25px' }}>
Utilize the Hive Mind to coordinate multiple labs into a single autonomous workflow.
</p>
<button
onClick={() => { }} // Navigate to /workflow later
style={{
padding: '12px 30px',
background: 'transparent',
border: '1px solid #646cff',
color: '#646cff',
borderRadius: '30px',
cursor: 'pointer',
fontWeight: 'bold',
transition: 'all 0.3s'
}}
onMouseOver={(e) => {
e.currentTarget.style.background = '#646cff';
e.currentTarget.style.color = 'white';
}}
onMouseOut={(e) => {
e.currentTarget.style.background = 'transparent';
e.currentTarget.style.color = '#646cff';
}}
>
ENTER WORKFLOW BUILDER
</button>
</div>
<style>{`
.lab-card:hover {
transform: translateY(-5px);
background: rgba(255, 255, 255, 0.06);
box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.lab-card:hover .card-glint {
left: 100%;
}
.card-glint {
position: absolute;
top: 0;
left: -100%;
width: 50%;
height: 100%;
background: linear-gradient(to right, transparent, rgba(255,255,255,0.1), transparent);
transition: left 0.6s ease;
pointer-events: none;
}
`}</style>
</div>
);
};
export default LabSelector;
|