diff --git a/frontend/src/app/App.tsx b/frontend/src/app/App.tsx index 625d6a5..39cb784 100644 --- a/frontend/src/app/App.tsx +++ b/frontend/src/app/App.tsx @@ -1,11 +1,24 @@ +import { useState, useEffect } from "react"; import "@/shared/styles/index.css"; import "primereact/resources/themes/lara-light-cyan/theme.css"; import "primereact/resources/primereact.min.css"; import "primeicons/primeicons.css"; import { PrimeReactProvider } from "primereact/api"; import { Routing } from "./providers/routing/routing"; +import { AppLoader } from "./components/AppLoader"; function App() { + const [loading, setLoading] = useState(true); + + useEffect(() => { + const timer = setTimeout(() => setLoading(false), 1800); + return () => clearTimeout(timer); + }, []); + + if (loading) { + return ; + } + return ( diff --git a/frontend/src/app/components/AppLoader.tsx b/frontend/src/app/components/AppLoader.tsx new file mode 100644 index 0000000..fa8a6d0 --- /dev/null +++ b/frontend/src/app/components/AppLoader.tsx @@ -0,0 +1,247 @@ +import { useEffect, useState } from "react"; +import { FaMicrochip, FaCode, FaNetworkWired, FaAtom } from "react-icons/fa"; + +export const AppLoader = () => { + const [progress, setProgress] = useState(0); + const [phase, setPhase] = useState(0); + + useEffect(() => { + const phases = [ + { progress: 25, delay: 400 }, + { progress: 50, delay: 300 }, + { progress: 75, delay: 400 }, + { progress: 100, delay: 300 }, + ]; + + let timeouts: NodeJS.Timeout[] = []; + let currentDelay = 0; + + phases.forEach((p, i) => { + currentDelay += p.delay; + timeouts.push( + setTimeout(() => { + setProgress(p.progress); + setPhase(i); + }, currentDelay), + ); + }); + + return () => timeouts.forEach(clearTimeout); + }, []); + + return ( +
+ {/* Background grid effect */} +
+ + {/* Glowing orbs */} +
+
+ + {/* Main content */} +
+ {/* Logo with animation */} +
+
+ +
+

+ HellreigN +

+
+ + {/* Loading icons animation */} +
+ {[ + { icon: FaMicrochip, delay: "0s" }, + { icon: FaNetworkWired, delay: "0.2s" }, + { icon: FaCode, delay: "0.4s" }, + ].map(({ icon: Icon, delay }, i) => ( +
= i + ? "rgba(59, 130, 246, 0.6)" + : "rgba(255,255,255,0.1)" + }`, + display: "flex", + alignItems: "center", + justifyContent: "center", + backgroundColor: + phase >= i ? "rgba(59, 130, 246, 0.1)" : "transparent", + animation: `iconPop 0.5s ease-out ${delay} both`, + transition: "all 0.3s ease", + }} + > + = i ? "#3b82f6" : "#555", + transition: "color 0.3s ease", + }} + /> +
+ ))} +
+ + {/* Progress bar */} +
+
+
+ + {/* Status text */} +
+ {phase === 0 && "INITIALIZING CORE..."} + {phase === 1 && "LOADING AGENTS..."} + {phase === 2 && "ESTABLISHING CONNECTIONS..."} + {phase === 3 && "READY"} +
+
+ + {/* CSS Animations */} + +
+ ); +};