|
|
|
|
@@ -1,72 +1,79 @@
|
|
|
|
|
"use client";
|
|
|
|
|
|
|
|
|
|
import { useState } from "react";
|
|
|
|
|
import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider";
|
|
|
|
|
import ReactLenis from "lenis/react";
|
|
|
|
|
import FooterCard from '@/components/sections/footer/FooterCard';
|
|
|
|
|
import MediaAbout from '@/components/sections/about/MediaAbout';
|
|
|
|
|
import NavbarStyleFullscreen from '@/components/navbar/NavbarStyleFullscreen/NavbarStyleFullscreen';
|
|
|
|
|
import PricingCardOne from '@/components/sections/pricing/PricingCardOne';
|
|
|
|
|
|
|
|
|
|
export default function AdminPage() {
|
|
|
|
|
const [password, setPassword] = useState("");
|
|
|
|
|
const [isAuthenticated, setIsAuthenticated] = useState(false);
|
|
|
|
|
const [templates, setTemplates] = useState<any[]>([]);
|
|
|
|
|
|
|
|
|
|
const handleLogin = () => {
|
|
|
|
|
if (password === "Arshia@41010") {
|
|
|
|
|
setIsAuthenticated(true);
|
|
|
|
|
} else {
|
|
|
|
|
alert("Invalid password");
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const addTemplate = () => {
|
|
|
|
|
setTemplates([...templates, { id: Date.now().toString(), name: "", description: "", price: "", free: false, image: "" }]);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const updateTemplate = (id: string, field: string, value: any) => {
|
|
|
|
|
setTemplates(templates.map(t => t.id === id ? { ...t, [field]: value } : t));
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<ThemeProvider
|
|
|
|
|
defaultButtonVariant="text-stagger"
|
|
|
|
|
defaultTextAnimation="background-highlight"
|
|
|
|
|
borderRadius="pill"
|
|
|
|
|
contentWidth="medium"
|
|
|
|
|
sizing="medium"
|
|
|
|
|
background="circleGradient"
|
|
|
|
|
cardStyle="glass-elevated"
|
|
|
|
|
primaryButtonStyle="gradient"
|
|
|
|
|
secondaryButtonStyle="glass"
|
|
|
|
|
headingFontWeight="normal"
|
|
|
|
|
defaultButtonVariant="text-stagger"
|
|
|
|
|
defaultTextAnimation="background-highlight"
|
|
|
|
|
borderRadius="pill"
|
|
|
|
|
contentWidth="medium"
|
|
|
|
|
sizing="medium"
|
|
|
|
|
background="circleGradient"
|
|
|
|
|
cardStyle="glass-elevated"
|
|
|
|
|
primaryButtonStyle="gradient"
|
|
|
|
|
secondaryButtonStyle="glass"
|
|
|
|
|
headingFontWeight="normal"
|
|
|
|
|
>
|
|
|
|
|
<ReactLenis root>
|
|
|
|
|
<div style={{ backgroundImage: "url('https://webuild-dev.s3.eu-north-1.amazonaws.com/users/user_3EACxAErYjKmkktsc1OnkSFxcSZ/uploaded-1779613980939-kyufwnfu.jpg')", backgroundSize: 'cover', backgroundAttachment: 'fixed' }}>
|
|
|
|
|
<div id="nav" data-section="nav">
|
|
|
|
|
<NavbarStyleFullscreen
|
|
|
|
|
navItems={[
|
|
|
|
|
{ name: "Home", id: "/" },
|
|
|
|
|
{ name: "Templates", id: "/templates" },
|
|
|
|
|
{ name: "Freebies", id: "/freebies" },
|
|
|
|
|
{ name: "About", id: "/about" },
|
|
|
|
|
{ name: "Admin", id: "/admin" },
|
|
|
|
|
]}
|
|
|
|
|
brandName="BrightBytee Studios"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div id="about" data-section="about">
|
|
|
|
|
<MediaAbout
|
|
|
|
|
useInvertedBackground={false}
|
|
|
|
|
title="Admin Control Portal"
|
|
|
|
|
description="Securely manage templates, monitor sales, and view analytics for the entire studio ecosystem."
|
|
|
|
|
imageSrc="http://img.b2bpic.net/free-photo/portrait-exhausted-workaholic-man-manager-typing-financial-strategy-using-laptop-computer-while-sitting-desk-table-business-company-office_482257-2321.jpg"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div id="pricing" data-section="pricing">
|
|
|
|
|
<PricingCardOne
|
|
|
|
|
animationType="slide-up"
|
|
|
|
|
textboxLayout="default"
|
|
|
|
|
useInvertedBackground={false}
|
|
|
|
|
title="Manage Operations"
|
|
|
|
|
description="Direct access to product lifecycle and customer support ticketing."
|
|
|
|
|
plans={[
|
|
|
|
|
{ id: "a1", badge: "Analytics", price: "₹N/A", subtitle: "Live statistics", features: ["Sales Tracking", "Template Performance", "User Insights"] },
|
|
|
|
|
{ id: "a2", badge: "Support", price: "₹N/A", subtitle: "Customer hub", features: ["Manage Tickets", "Refund Processing", "Priority Communications"] }
|
|
|
|
|
]}
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div id="footer" data-section="footer">
|
|
|
|
|
<FooterCard
|
|
|
|
|
logoText="BrightBytee Studios"
|
|
|
|
|
copyrightText="© 2025 BrightBytee Studios. All Rights Reserved."
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</ReactLenis>
|
|
|
|
|
<NavbarStyleFullscreen
|
|
|
|
|
navItems={[
|
|
|
|
|
{ name: "Home", id: "/" },
|
|
|
|
|
{ name: "Templates", id: "/templates" },
|
|
|
|
|
{ name: "Freebies", id: "/freebies" },
|
|
|
|
|
{ name: "About", id: "/about" },
|
|
|
|
|
{ name: "Admin", id: "/admin" },
|
|
|
|
|
]}
|
|
|
|
|
brandName="BrightBytee Studios"
|
|
|
|
|
/>
|
|
|
|
|
<main className="pt-32 pb-20 px-6 container mx-auto">
|
|
|
|
|
{!isAuthenticated ? (
|
|
|
|
|
<div className="max-w-md mx-auto bg-white/10 p-8 rounded-2xl backdrop-blur-md">
|
|
|
|
|
<h1 className="text-2xl mb-4">Admin Access</h1>
|
|
|
|
|
<input type="password" value={password} onChange={(e) => setPassword(e.target.value)} className="w-full p-2 mb-4 rounded bg-white/5" placeholder="Password" />
|
|
|
|
|
<button onClick={handleLogin} className="w-full bg-primary text-white p-2 rounded">Login</button>
|
|
|
|
|
</div>
|
|
|
|
|
) : (
|
|
|
|
|
<div className="bg-white/10 p-8 rounded-2xl backdrop-blur-md">
|
|
|
|
|
<div className="flex justify-between items-center mb-6">
|
|
|
|
|
<h1 className="text-4xl font-bold">Admin Dashboard</h1>
|
|
|
|
|
<button onClick={addTemplate} className="bg-primary text-white px-6 py-2 rounded-full">+ Add Template</button>
|
|
|
|
|
</div>
|
|
|
|
|
<div className="grid gap-6">
|
|
|
|
|
{templates.map((t) => (
|
|
|
|
|
<div key={t.id} className="p-4 border rounded-xl flex gap-4 items-center">
|
|
|
|
|
<input placeholder="Title" value={t.name} onChange={(e) => updateTemplate(t.id, 'name', e.target.value)} className="bg-transparent border p-1 rounded" />
|
|
|
|
|
<input placeholder="Description" value={t.description} onChange={(e) => updateTemplate(t.id, 'description', e.target.value)} className="bg-transparent border p-1 rounded" />
|
|
|
|
|
<input placeholder="Price" disabled={t.free} value={t.price} onChange={(e) => updateTemplate(t.id, 'price', e.target.value)} className="bg-transparent border p-1 rounded w-20" />
|
|
|
|
|
<label className="flex items-center gap-2"><input type="checkbox" checked={t.free} onChange={(e) => updateTemplate(t.id, 'free', e.target.checked)} /> Free</label>
|
|
|
|
|
</div>
|
|
|
|
|
))}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
</main>
|
|
|
|
|
</ThemeProvider>
|
|
|
|
|
);
|
|
|
|
|
}
|