feat: add a white theme
This commit is contained in:
@@ -1,38 +1,5 @@
|
||||
"use client";
|
||||
|
||||
import { useEffect } from "react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useSession } from "next-auth/react";
|
||||
import Sidebar from "@/components/Sidebar";
|
||||
import AppLayout from "@/components/AppLayout";
|
||||
|
||||
export default function AuthLayout({ children }: { children: React.ReactNode }) {
|
||||
const { status } = useSession();
|
||||
const router = useRouter();
|
||||
|
||||
useEffect(() => {
|
||||
if (status === "unauthenticated") {
|
||||
router.push("/");
|
||||
}
|
||||
}, [status, router]);
|
||||
|
||||
if (status === "loading") {
|
||||
return (
|
||||
<div className="min-h-screen bg-[#0d1117] flex items-center justify-center">
|
||||
<span className="text-[#4aff8c]/60 font-mono text-xs tracking-widest animate-pulse">
|
||||
CHARGEMENT...
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
if (status !== "authenticated") return null;
|
||||
|
||||
return (
|
||||
<div className="flex min-h-screen bg-[#0d1117]">
|
||||
<Sidebar />
|
||||
<main className="ml-56 flex-1 p-8 bg-[#0d1117]">
|
||||
{children}
|
||||
</main>
|
||||
</div>
|
||||
);
|
||||
return <AppLayout>{children}</AppLayout>;
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
export default function DashboardPage() {
|
||||
return (
|
||||
<div>
|
||||
<div className="text-sm font-mono tracking-widest text-acid-green/70 uppercase mb-1">Vue générale</div>
|
||||
<h1 className="text-3xl font-black tracking-widest text-white uppercase mb-8">Tableau de bord</h1>
|
||||
<p className="text-wy-text-secondary font-mono text-sm">Données à venir...</p>
|
||||
<div className="text-sm font-mono tracking-widest uppercase mb-1" style={{ color: "var(--accent)" }}>Vue générale</div>
|
||||
<h1 className="text-3xl font-black tracking-widest uppercase mb-8" style={{ color: "var(--text-primary)" }}>Tableau de bord</h1>
|
||||
<p className="font-mono text-sm" style={{ color: "var(--text-secondary)" }}>Données à venir...</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -1,29 +1,5 @@
|
||||
"use client";
|
||||
|
||||
import { useEffect } from "react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useSession } from "next-auth/react";
|
||||
import Sidebar from "@/components/Sidebar";
|
||||
import AppLayout from "@/components/AppLayout";
|
||||
|
||||
export default function AuthLayout({ children }: { children: React.ReactNode }) {
|
||||
const { status } = useSession();
|
||||
const router = useRouter();
|
||||
|
||||
useEffect(() => {
|
||||
if (status === "unauthenticated") {
|
||||
router.push("/");
|
||||
}
|
||||
}, [status, router]);
|
||||
|
||||
if (status === "loading") return null;
|
||||
if (status !== "authenticated") return null;
|
||||
|
||||
return (
|
||||
<div className="flex min-h-screen bg-[#0d1117]">
|
||||
<Sidebar />
|
||||
<main className="ml-56 flex-1 p-8 bg-[#0d1117]">
|
||||
{children}
|
||||
</main>
|
||||
</div>
|
||||
);
|
||||
return <AppLayout>{children}</AppLayout>;
|
||||
}
|
||||
@@ -10,7 +10,7 @@ export default function FinancesPage() {
|
||||
</div>
|
||||
<div>
|
||||
<div className="text-[9px] font-mono tracking-[0.3em] text-yellow-400/70 uppercase mb-0.5">Revenus</div>
|
||||
<h1 className="text-2xl font-black tracking-widest text-white uppercase">Finances</h1>
|
||||
<h1 className="text-2xl font-black tracking-widest uppercase" style={{ color: "var(--text-primary)" }}>Finances</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -21,9 +21,10 @@ export default function FinancesPage() {
|
||||
<StatCard label="Abonnements" value="—" sub="Aucune donnée" accent="gold" />
|
||||
</div>
|
||||
|
||||
<div className="bg-[#111a14] border border-[#1e2d1e] rounded-sm p-8 flex flex-col items-center justify-center gap-3 min-h-[200px]">
|
||||
<div className="border rounded-sm p-8 flex flex-col items-center justify-center gap-3 min-h-[200px]"
|
||||
style={{ background: "var(--surface)", borderColor: "var(--border)" }}>
|
||||
<DollarSign size={32} className="text-yellow-400/30" />
|
||||
<p className="text-[#7a9a7a] font-mono text-xs tracking-widest text-center">
|
||||
<p className="font-mono text-xs tracking-widest text-center" style={{ color: "var(--text-secondary)" }}>
|
||||
AUCUNE DONNÉE FINANCIÈRE DISPONIBLE<br />POUR LE MOMENT
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -2,6 +2,36 @@
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
/* ── Dark theme (default) ── */
|
||||
:root {
|
||||
--bg: #0d1117;
|
||||
--surface: #161b22;
|
||||
--border: #30363d;
|
||||
--text-primary: #c9d1d9;
|
||||
--text-secondary: #8b949e;
|
||||
--accent: #4aff8c;
|
||||
--accent-dim: rgba(74,255,140,0.1);
|
||||
--accent-border: rgba(74,255,140,0.3);
|
||||
}
|
||||
|
||||
/* ── Light theme ── */
|
||||
html.light {
|
||||
--bg: #f0f6ff;
|
||||
--surface: #ffffff;
|
||||
--border: #d0d7de;
|
||||
--text-primary: #1c2128;
|
||||
--text-secondary: #57606a;
|
||||
--accent: #0ea5e9;
|
||||
--accent-dim: rgba(14,165,233,0.1);
|
||||
--accent-border: rgba(14,165,233,0.3);
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: var(--bg);
|
||||
color: var(--text-primary);
|
||||
transition: background-color 0.2s ease, color 0.2s ease;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar { width: 4px; }
|
||||
::-webkit-scrollbar-track { background: transparent; }
|
||||
::-webkit-scrollbar-thumb { background: #30363d; border-radius: 2px; }
|
||||
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
|
||||
|
||||
@@ -1,29 +1,5 @@
|
||||
"use client";
|
||||
|
||||
import { useEffect } from "react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useSession } from "next-auth/react";
|
||||
import Sidebar from "@/components/Sidebar";
|
||||
import AppLayout from "@/components/AppLayout";
|
||||
|
||||
export default function AuthLayout({ children }: { children: React.ReactNode }) {
|
||||
const { status } = useSession();
|
||||
const router = useRouter();
|
||||
|
||||
useEffect(() => {
|
||||
if (status === "unauthenticated") {
|
||||
router.push("/");
|
||||
}
|
||||
}, [status, router]);
|
||||
|
||||
if (status === "loading") return null;
|
||||
if (status !== "authenticated") return null;
|
||||
|
||||
return (
|
||||
<div className="flex min-h-screen bg-[#0d1117]">
|
||||
<Sidebar />
|
||||
<main className="ml-56 flex-1 p-8 bg-[#0d1117]">
|
||||
{children}
|
||||
</main>
|
||||
</div>
|
||||
);
|
||||
return <AppLayout>{children}</AppLayout>;
|
||||
}
|
||||
@@ -10,7 +10,7 @@ export default function InstagramPage() {
|
||||
</div>
|
||||
<div>
|
||||
<div className="text-[9px] font-mono tracking-[0.3em] text-orange-400/70 uppercase mb-0.5">Plateforme</div>
|
||||
<h1 className="text-2xl font-black tracking-widest text-white uppercase">Instagram</h1>
|
||||
<h1 className="text-2xl font-black tracking-widest uppercase" style={{ color: "var(--text-primary)" }}>Instagram</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -21,9 +21,10 @@ export default function InstagramPage() {
|
||||
<StatCard label="Portée moy." value="—" sub="Aucune donnée" accent="gold" />
|
||||
</div>
|
||||
|
||||
<div className="bg-[#111a14] border border-[#1e2d1e] rounded-sm p-8 flex flex-col items-center justify-center gap-3 min-h-[200px]">
|
||||
<div className="border rounded-sm p-8 flex flex-col items-center justify-center gap-3 min-h-[200px]"
|
||||
style={{ background: "var(--surface)", borderColor: "var(--border)" }}>
|
||||
<Camera size={32} className="text-orange-400/30" />
|
||||
<p className="text-[#7a9a7a] font-mono text-xs tracking-widest text-center">
|
||||
<p className="font-mono text-xs tracking-widest text-center" style={{ color: "var(--text-secondary)" }}>
|
||||
CONNECTEZ VOTRE COMPTE INSTAGRAM<br />POUR AFFICHER VOS STATISTIQUES
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import type { Metadata } from "next";
|
||||
import "./globals.css";
|
||||
import { SessionProvider } from "next-auth/react";
|
||||
import { ThemeProvider } from "@/lib/theme";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "WYVIEW",
|
||||
@@ -12,7 +13,9 @@ export default function RootLayout({ children }: { children: React.ReactNode })
|
||||
<html lang="fr">
|
||||
<body className="bg-wy-dark text-wy-text-primary antialiased">
|
||||
<SessionProvider>
|
||||
{children}
|
||||
<ThemeProvider>
|
||||
{children}
|
||||
</ThemeProvider>
|
||||
</SessionProvider>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
68
app/page.tsx
68
app/page.tsx
@@ -8,13 +8,11 @@ import DragonEye from "@/components/DragonEye";
|
||||
export default function AuthPage() {
|
||||
const [tab, setTab] = useState<"login" | "register">("login");
|
||||
|
||||
// Login state
|
||||
const [loginEmail, setLoginEmail] = useState("");
|
||||
const [loginPassword, setLoginPassword] = useState("");
|
||||
const [loginError, setLoginError] = useState("");
|
||||
const [loginLoading, setLoginLoading] = useState(false);
|
||||
|
||||
// Register state
|
||||
const [regName, setRegName] = useState("");
|
||||
const [regEmail, setRegEmail] = useState("");
|
||||
const [regPassword, setRegPassword] = useState("");
|
||||
@@ -85,61 +83,64 @@ export default function AuthPage() {
|
||||
}
|
||||
};
|
||||
|
||||
const inputStyle: React.CSSProperties = {
|
||||
background: "var(--surface)",
|
||||
color: "var(--text-primary)",
|
||||
borderColor: "var(--border)",
|
||||
};
|
||||
|
||||
const inputClass = (hasError: boolean) =>
|
||||
`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"
|
||||
`w-full px-4 py-3 text-sm font-mono outline-none rounded-md transition-all duration-200 border ${
|
||||
hasError ? "border-red-500/60" : "focus:border-[color:var(--accent)]"
|
||||
}`;
|
||||
|
||||
return (
|
||||
<main className="min-h-screen bg-wy-dark flex flex-col items-center justify-center relative overflow-hidden">
|
||||
<main className="min-h-screen flex flex-col items-center justify-center relative overflow-hidden"
|
||||
style={{ background: "var(--bg)", color: "var(--text-primary)" }}>
|
||||
<div
|
||||
className="absolute inset-0 opacity-20 pointer-events-none"
|
||||
style={{
|
||||
backgroundImage: `linear-gradient(rgba(74,255,140,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(74,255,140,0.05) 1px, transparent 1px)`,
|
||||
backgroundImage: `linear-gradient(var(--accent-border) 1px, transparent 1px), linear-gradient(90deg, var(--accent-border) 1px, transparent 1px)`,
|
||||
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-acid-green/[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 blur-3xl pointer-events-none"
|
||||
style={{ background: "var(--accent-dim)" }} />
|
||||
|
||||
<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-acid-green/70 uppercase mb-2 font-mono">
|
||||
<div className="text-[9px] tracking-[0.45em] uppercase mb-2 font-mono" style={{ color: "var(--accent)" }}>
|
||||
Analytics Dashboard
|
||||
</div>
|
||||
<h1 className="text-4xl font-black tracking-[0.15em] uppercase text-wy-text-primary">
|
||||
<h1 className="text-4xl font-black tracking-[0.15em] uppercase" style={{ color: "var(--text-primary)" }}>
|
||||
WYVIEW
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Tabs */}
|
||||
<div className="w-full flex border border-wy-border rounded-md overflow-hidden">
|
||||
<div className="w-full flex rounded-md overflow-hidden" style={{ border: "1px solid var(--border)" }}>
|
||||
<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-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"
|
||||
}`}
|
||||
className="flex-1 py-2 text-[10px] font-mono tracking-[0.3em] uppercase transition-all duration-200"
|
||||
style={tab === "login"
|
||||
? { background: "var(--accent-dim)", color: "var(--accent)", borderRight: "1px solid var(--border)" }
|
||||
: { color: "var(--text-secondary)", borderRight: "1px solid var(--border)" }}
|
||||
>
|
||||
CONNEXION
|
||||
</button>
|
||||
<button
|
||||
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-acid-green/10 text-acid-green"
|
||||
: "text-wy-text-secondary hover:text-acid-green/80"
|
||||
}`}
|
||||
className="flex-1 py-2 text-[10px] font-mono tracking-[0.3em] uppercase transition-all duration-200"
|
||||
style={tab === "register"
|
||||
? { background: "var(--accent-dim)", color: "var(--accent)" }
|
||||
: { color: "var(--text-secondary)" }}
|
||||
>
|
||||
INSCRIPTION
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{/* Login Form */}
|
||||
{tab === "login" && (
|
||||
<form onSubmit={handleLogin} className="w-full flex flex-col gap-3">
|
||||
<input
|
||||
@@ -149,6 +150,7 @@ export default function AuthPage() {
|
||||
autoComplete="email"
|
||||
onChange={(e) => { setLoginEmail(e.target.value); setLoginError(""); }}
|
||||
className={inputClass(!!loginError)}
|
||||
style={inputStyle}
|
||||
/>
|
||||
<input
|
||||
type="password"
|
||||
@@ -157,6 +159,7 @@ export default function AuthPage() {
|
||||
autoComplete="current-password"
|
||||
onChange={(e) => { setLoginPassword(e.target.value); setLoginError(""); }}
|
||||
className={inputClass(!!loginError)}
|
||||
style={inputStyle}
|
||||
/>
|
||||
{loginError && (
|
||||
<p className="text-red-400/80 text-[11px] font-mono tracking-widest">— {loginError}</p>
|
||||
@@ -164,14 +167,16 @@ 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-acid-green text-acid-green hover:bg-acid-green/10 transition-all duration-200 rounded-md disabled:opacity-50 disabled:cursor-not-allowed"
|
||||
className="w-full py-3 text-[11px] font-mono tracking-[0.3em] uppercase font-bold rounded-md border transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed"
|
||||
style={{ borderColor: "var(--accent)", color: "var(--accent)" }}
|
||||
onMouseEnter={e => (e.currentTarget.style.background = "var(--accent-dim)")}
|
||||
onMouseLeave={e => (e.currentTarget.style.background = "transparent")}
|
||||
>
|
||||
{loginLoading ? "CONNEXION..." : "ACCÉDER"}
|
||||
</button>
|
||||
</form>
|
||||
)}
|
||||
|
||||
{/* Register Form */}
|
||||
{tab === "register" && (
|
||||
<form onSubmit={handleRegister} className="w-full flex flex-col gap-3">
|
||||
<input
|
||||
@@ -181,6 +186,7 @@ export default function AuthPage() {
|
||||
autoComplete="name"
|
||||
onChange={(e) => { setRegName(e.target.value); setRegError(""); }}
|
||||
className={inputClass(false)}
|
||||
style={inputStyle}
|
||||
/>
|
||||
<input
|
||||
type="email"
|
||||
@@ -189,6 +195,7 @@ export default function AuthPage() {
|
||||
autoComplete="email"
|
||||
onChange={(e) => { setRegEmail(e.target.value); setRegError(""); }}
|
||||
className={inputClass(!!regError)}
|
||||
style={inputStyle}
|
||||
/>
|
||||
<input
|
||||
type="password"
|
||||
@@ -197,6 +204,7 @@ export default function AuthPage() {
|
||||
autoComplete="new-password"
|
||||
onChange={(e) => { setRegPassword(e.target.value); setRegError(""); }}
|
||||
className={inputClass(!!regError)}
|
||||
style={inputStyle}
|
||||
/>
|
||||
<input
|
||||
type="password"
|
||||
@@ -205,24 +213,28 @@ export default function AuthPage() {
|
||||
autoComplete="new-password"
|
||||
onChange={(e) => { setRegConfirm(e.target.value); setRegError(""); }}
|
||||
className={inputClass(!!regError && regPassword !== regConfirm)}
|
||||
style={inputStyle}
|
||||
/>
|
||||
{regError && (
|
||||
<p className="text-red-400/80 text-[11px] font-mono tracking-widest">— {regError}</p>
|
||||
)}
|
||||
{regSuccess && (
|
||||
<p className="text-acid-green/80 text-[11px] font-mono tracking-widest">✓ {regSuccess}</p>
|
||||
<p className="text-[11px] font-mono tracking-widest" style={{ color: "var(--accent)" }}>✓ {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-acid-green text-acid-green hover:bg-acid-green/10 transition-all duration-200 rounded-md disabled:opacity-50 disabled:cursor-not-allowed"
|
||||
className="w-full py-3 text-[11px] font-mono tracking-[0.3em] uppercase font-bold rounded-md border transition-all duration-200 disabled:opacity-50 disabled:cursor-not-allowed"
|
||||
style={{ borderColor: "var(--accent)", color: "var(--accent)" }}
|
||||
onMouseEnter={e => (e.currentTarget.style.background = "var(--accent-dim)")}
|
||||
onMouseLeave={e => (e.currentTarget.style.background = "transparent")}
|
||||
>
|
||||
{regLoading ? "CRÉATION..." : "CRÉER UN COMPTE"}
|
||||
</button>
|
||||
</form>
|
||||
)}
|
||||
|
||||
<div className="text-[9px] font-mono text-wy-text-secondary/50 tracking-[0.3em]">
|
||||
<div className="text-[9px] font-mono tracking-[0.3em]" style={{ color: "var(--text-secondary)" }}>
|
||||
WYVIEW v1.0 /// CROWMATE
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,29 +1,5 @@
|
||||
"use client";
|
||||
|
||||
import { useEffect } from "react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useSession } from "next-auth/react";
|
||||
import Sidebar from "@/components/Sidebar";
|
||||
import AppLayout from "@/components/AppLayout";
|
||||
|
||||
export default function AuthLayout({ children }: { children: React.ReactNode }) {
|
||||
const { status } = useSession();
|
||||
const router = useRouter();
|
||||
|
||||
useEffect(() => {
|
||||
if (status === "unauthenticated") {
|
||||
router.push("/");
|
||||
}
|
||||
}, [status, router]);
|
||||
|
||||
if (status === "loading") return null;
|
||||
if (status !== "authenticated") return null;
|
||||
|
||||
return (
|
||||
<div className="flex min-h-screen bg-[#0d1117]">
|
||||
<Sidebar />
|
||||
<main className="ml-56 flex-1 p-8 bg-[#0d1117]">
|
||||
{children}
|
||||
</main>
|
||||
</div>
|
||||
);
|
||||
return <AppLayout>{children}</AppLayout>;
|
||||
}
|
||||
@@ -70,7 +70,7 @@ export default function TikTokPage() {
|
||||
</div>
|
||||
<div>
|
||||
<div className="text-[9px] font-mono tracking-[0.3em] text-pink-400/70 uppercase mb-0.5">Plateforme</div>
|
||||
<h1 className="text-2xl font-black tracking-widest text-white uppercase">TikTok</h1>
|
||||
<h1 className="text-2xl font-black tracking-widest uppercase" style={{ color: "var(--text-primary)" }}>TikTok</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -99,7 +99,7 @@ export default function TikTokPage() {
|
||||
|
||||
{/* Chargement */}
|
||||
{loading && (
|
||||
<div className="flex items-center justify-center min-h-[200px] gap-3 text-[#6a8a6a] font-mono text-xs">
|
||||
<div className="flex items-center justify-center min-h-[200px] gap-3 font-mono text-xs" style={{ color: "var(--text-secondary)" }}>
|
||||
<Loader2 size={16} className="animate-spin text-pink-400/60" />
|
||||
Chargement...
|
||||
</div>
|
||||
@@ -147,11 +147,11 @@ export default function TikTokPage() {
|
||||
</>
|
||||
)}
|
||||
|
||||
{/* Non connecté */}
|
||||
{!loading && !stats && !error && (
|
||||
<div className="bg-[#111a14] border border-[#1e2d1e] rounded-sm p-12 flex flex-col items-center justify-center gap-5 min-h-[240px]">
|
||||
<div className="border rounded-sm p-12 flex flex-col items-center justify-center gap-5 min-h-[240px]"
|
||||
style={{ background: "var(--surface)", borderColor: "var(--border)" }}>
|
||||
<Music2 size={36} className="text-pink-400/30" />
|
||||
<p className="text-[#7a9a7a] font-mono text-xs tracking-widest text-center uppercase">
|
||||
<p className="font-mono text-xs tracking-widest text-center uppercase" style={{ color: "var(--text-secondary)" }}>
|
||||
Connectez votre compte TikTok<br />pour afficher vos statistiques
|
||||
</p>
|
||||
<a
|
||||
@@ -164,12 +164,13 @@ export default function TikTokPage() {
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Erreur API */}
|
||||
{!loading && error && (
|
||||
<div className="bg-[#111a14] border border-red-500/25 rounded-sm p-8 flex flex-col items-center justify-center gap-3 min-h-[200px]">
|
||||
<div className="border border-red-500/25 rounded-sm p-8 flex flex-col items-center justify-center gap-3 min-h-[200px]"
|
||||
style={{ background: "var(--surface)" }}>
|
||||
<AlertTriangle size={28} className="text-red-400/60" />
|
||||
<p className="text-red-400/80 font-mono text-xs tracking-widest text-center uppercase">{error}</p>
|
||||
<button onClick={loadStats} className="text-[10px] font-mono tracking-widest text-[#6a8a6a] hover:text-pink-400 uppercase transition-colors">
|
||||
<button onClick={loadStats} className="text-[10px] font-mono tracking-widest uppercase transition-colors hover:text-pink-400"
|
||||
style={{ color: "var(--text-secondary)" }}>
|
||||
Réessayer
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -1,29 +1,5 @@
|
||||
"use client";
|
||||
|
||||
import { useEffect } from "react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useSession } from "next-auth/react";
|
||||
import Sidebar from "@/components/Sidebar";
|
||||
import AppLayout from "@/components/AppLayout";
|
||||
|
||||
export default function AuthLayout({ children }: { children: React.ReactNode }) {
|
||||
const { status } = useSession();
|
||||
const router = useRouter();
|
||||
|
||||
useEffect(() => {
|
||||
if (status === "unauthenticated") {
|
||||
router.push("/");
|
||||
}
|
||||
}, [status, router]);
|
||||
|
||||
if (status === "loading") return null;
|
||||
if (status !== "authenticated") return null;
|
||||
|
||||
return (
|
||||
<div className="flex min-h-screen bg-[#0d1117]">
|
||||
<Sidebar />
|
||||
<main className="ml-56 flex-1 p-8 bg-[#0d1117]">
|
||||
{children}
|
||||
</main>
|
||||
</div>
|
||||
);
|
||||
return <AppLayout>{children}</AppLayout>;
|
||||
}
|
||||
@@ -10,7 +10,7 @@ export default function TwitchPage() {
|
||||
</div>
|
||||
<div>
|
||||
<div className="text-[9px] font-mono tracking-[0.3em] text-purple-400/70 uppercase mb-0.5">Plateforme</div>
|
||||
<h1 className="text-2xl font-black tracking-widest text-white uppercase">Twitch</h1>
|
||||
<h1 className="text-2xl font-black tracking-widest uppercase" style={{ color: "var(--text-primary)" }}>Twitch</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -21,9 +21,10 @@ export default function TwitchPage() {
|
||||
<StatCard label="Abonnés actifs" value="—" sub="Aucune donnée" accent="purple" />
|
||||
</div>
|
||||
|
||||
<div className="bg-[#111a14] border border-[#1e2d1e] rounded-sm p-8 flex flex-col items-center justify-center gap-3 min-h-[200px]">
|
||||
<div className="border rounded-sm p-8 flex flex-col items-center justify-center gap-3 min-h-[200px]"
|
||||
style={{ background: "var(--surface)", borderColor: "var(--border)" }}>
|
||||
<TwitchIcon size={32} className="text-purple-400/30" />
|
||||
<p className="text-[#7a9a7a] font-mono text-xs tracking-widest text-center">
|
||||
<p className="font-mono text-xs tracking-widest text-center" style={{ color: "var(--text-secondary)" }}>
|
||||
CONNECTEZ VOTRE COMPTE TWITCH<br />POUR AFFICHER VOS STATISTIQUES
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -1,29 +1,5 @@
|
||||
"use client";
|
||||
|
||||
import { useEffect } from "react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useSession } from "next-auth/react";
|
||||
import Sidebar from "@/components/Sidebar";
|
||||
import AppLayout from "@/components/AppLayout";
|
||||
|
||||
export default function AuthLayout({ children }: { children: React.ReactNode }) {
|
||||
const { status } = useSession();
|
||||
const router = useRouter();
|
||||
|
||||
useEffect(() => {
|
||||
if (status === "unauthenticated") {
|
||||
router.push("/");
|
||||
}
|
||||
}, [status, router]);
|
||||
|
||||
if (status === "loading") return null;
|
||||
if (status !== "authenticated") return null;
|
||||
|
||||
return (
|
||||
<div className="flex min-h-screen bg-[#0d1117]">
|
||||
<Sidebar />
|
||||
<main className="ml-56 flex-1 p-8 bg-[#0d1117]">
|
||||
{children}
|
||||
</main>
|
||||
</div>
|
||||
);
|
||||
return <AppLayout>{children}</AppLayout>;
|
||||
}
|
||||
@@ -10,7 +10,7 @@ export default function YoutubePage() {
|
||||
</div>
|
||||
<div>
|
||||
<div className="text-[9px] font-mono tracking-[0.3em] text-red-400/70 uppercase mb-0.5">Plateforme</div>
|
||||
<h1 className="text-2xl font-black tracking-widest text-white uppercase">YouTube</h1>
|
||||
<h1 className="text-2xl font-black tracking-widest uppercase" style={{ color: "var(--text-primary)" }}>YouTube</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -21,9 +21,10 @@ export default function YoutubePage() {
|
||||
<StatCard label="Watch time (h)" value="—" sub="Aucune donnée" accent="red" />
|
||||
</div>
|
||||
|
||||
<div className="bg-[#111a14] border border-[#1e2d1e] rounded-sm p-8 flex flex-col items-center justify-center gap-3 min-h-[200px]">
|
||||
<div className="border rounded-sm p-8 flex flex-col items-center justify-center gap-3 min-h-[200px]"
|
||||
style={{ background: "var(--surface)", borderColor: "var(--border)" }}>
|
||||
<YoutubeIcon size={32} className="text-red-400/30" />
|
||||
<p className="text-[#7a9a7a] font-mono text-xs tracking-widest text-center">
|
||||
<p className="font-mono text-xs tracking-widest text-center" style={{ color: "var(--text-secondary)" }}>
|
||||
CONNECTEZ VOTRE COMPTE YOUTUBE<br />POUR AFFICHER VOS STATISTIQUES
|
||||
</p>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user