perf: change the DA to something more readable

This commit is contained in:
Pierre Ryssen
2026-03-11 12:26:45 +01:00
parent cd15c81b53
commit 9642f2511a
22 changed files with 136 additions and 120 deletions

View File

@@ -86,12 +86,12 @@ export default function AuthPage() {
};
const inputClass = (hasError: boolean) =>
`w-full bg-[#0d1210] border px-4 py-3 text-sm font-mono text-white placeholder-[#2a3a2a] outline-none rounded-sm transition-all duration-200 ${
hasError ? "border-red-500/50" : "border-[#1a2a1a] focus:border-[#4aff8c]/40"
`w-full bg-wy-surface border px-4 py-3 text-sm font-mono text-wy-text-primary placeholder-wy-text-secondary outline-none rounded-md transition-all duration-200 ${
hasError ? "border-red-500/60" : "border-wy-border focus:border-acid-green/60"
}`;
return (
<main className="min-h-screen bg-[#0a0d0f] flex flex-col items-center justify-center relative overflow-hidden">
<main className="min-h-screen bg-wy-dark flex flex-col items-center justify-center relative overflow-hidden">
<div
className="absolute inset-0 opacity-20 pointer-events-none"
style={{
@@ -99,30 +99,30 @@ export default function AuthPage() {
backgroundSize: "40px 40px",
}}
/>
<div className="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[500px] h-[500px] rounded-full bg-[#4aff8c]/[0.02] blur-3xl pointer-events-none" />
<div className="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[500px] h-[500px] rounded-full bg-acid-green/[0.02] blur-3xl pointer-events-none" />
<div className="relative z-10 flex flex-col items-center gap-8 w-full max-w-sm px-6">
{/* Header */}
<div className="flex flex-col items-center gap-5">
<DragonEye size={80} />
<div className="text-center">
<div className="text-[9px] tracking-[0.45em] text-[#4aff8c]/50 uppercase mb-2 font-mono">
<div className="text-[9px] tracking-[0.45em] text-acid-green/70 uppercase mb-2 font-mono">
Analytics Dashboard
</div>
<h1 className="text-4xl font-black tracking-[0.15em] uppercase text-white">
<h1 className="text-4xl font-black tracking-[0.15em] uppercase text-wy-text-primary">
WYVIEW
</h1>
</div>
</div>
{/* Tabs */}
<div className="w-full flex border border-[#1a2a1a] rounded-sm overflow-hidden">
<div className="w-full flex border border-wy-border rounded-md overflow-hidden">
<button
onClick={() => { setTab("login"); setLoginError(""); }}
className={`flex-1 py-2 text-[10px] font-mono tracking-[0.3em] uppercase transition-all duration-200 ${
tab === "login"
? "bg-[#4aff8c]/10 text-[#4aff8c] border-r border-[#1a2a1a]"
: "text-[#2a4a2a] hover:text-[#4aff8c]/60 border-r border-[#1a2a1a]"
? "bg-acid-green/10 text-acid-green border-r border-wy-border"
: "text-wy-text-secondary hover:text-acid-green/80 border-r border-wy-border"
}`}
>
CONNEXION
@@ -131,8 +131,8 @@ export default function AuthPage() {
onClick={() => { setTab("register"); setRegError(""); setRegSuccess(""); }}
className={`flex-1 py-2 text-[10px] font-mono tracking-[0.3em] uppercase transition-all duration-200 ${
tab === "register"
? "bg-[#4aff8c]/10 text-[#4aff8c]"
: "text-[#2a4a2a] hover:text-[#4aff8c]/60"
? "bg-acid-green/10 text-acid-green"
: "text-wy-text-secondary hover:text-acid-green/80"
}`}
>
INSCRIPTION
@@ -164,7 +164,7 @@ export default function AuthPage() {
<button
type="submit"
disabled={loginLoading || !loginEmail || !loginPassword}
className="w-full py-3 text-[11px] font-mono tracking-[0.3em] uppercase font-bold border border-[#4aff8c]/30 text-[#4aff8c] hover:bg-[#4aff8c]/8 hover:border-[#4aff8c]/60 transition-all duration-200 rounded-sm disabled:opacity-30 disabled:cursor-not-allowed"
className="w-full py-3 text-[11px] font-mono tracking-[0.3em] uppercase font-bold border border-acid-green text-acid-green hover:bg-acid-green/10 transition-all duration-200 rounded-md disabled:opacity-50 disabled:cursor-not-allowed"
>
{loginLoading ? "CONNEXION..." : "ACCÉDER"}
</button>
@@ -210,19 +210,19 @@ export default function AuthPage() {
<p className="text-red-400/80 text-[11px] font-mono tracking-widest"> {regError}</p>
)}
{regSuccess && (
<p className="text-[#4aff8c]/80 text-[11px] font-mono tracking-widest"> {regSuccess}</p>
<p className="text-acid-green/80 text-[11px] font-mono tracking-widest"> {regSuccess}</p>
)}
<button
type="submit"
disabled={regLoading || !regEmail || !regPassword || !regConfirm}
className="w-full py-3 text-[11px] font-mono tracking-[0.3em] uppercase font-bold border border-[#4aff8c]/30 text-[#4aff8c] hover:bg-[#4aff8c]/8 hover:border-[#4aff8c]/60 transition-all duration-200 rounded-sm disabled:opacity-30 disabled:cursor-not-allowed"
className="w-full py-3 text-[11px] font-mono tracking-[0.3em] uppercase font-bold border border-acid-green text-acid-green hover:bg-acid-green/10 transition-all duration-200 rounded-md disabled:opacity-50 disabled:cursor-not-allowed"
>
{regLoading ? "CRÉATION..." : "CRÉER UN COMPTE"}
</button>
</form>
)}
<div className="text-[9px] font-mono text-[#1a3a1a] tracking-[0.3em]">
<div className="text-[9px] font-mono text-wy-text-secondary/50 tracking-[0.3em]">
WYVIEW v1.0 /// CROWMATE
</div>
</div>