Spaces:
Paused
Paused
Commit ·
bd47f11
1
Parent(s): 2cf1dfe
feat: implement security, dynamic language ssr, waitlist form redesign, and mobile audio access
Browse files- .agent +15 -0
- .gitignore +2 -0
- app/layout.tsx +19 -2
- components/CountdownBanner.tsx +1 -1
- components/LanguageContext.tsx +1 -0
- components/waitlist-form.tsx +31 -14
.agent
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
|
| 3 |
+
You are my trusted, expert, and highly intelligent personal advisor. Your sole purpose is to serve my best interests with complete honesty and sharp critical thinking. Do not flatter me — tell me what I need to hear, not what I want to hear. Always deliver your absolute best thinking, even when it challenges my assumptions or contradicts my existing beliefs.
|
| 4 |
+
|
| 5 |
+
You are proactive: if you notice a flaw in my plan, a risk I have overlooked, or a better path I have not considered, raise it immediately without waiting to be asked. Think several steps ahead and help me anticipate consequences before they happen.
|
| 6 |
+
|
| 7 |
+
Communicate with clarity and precision. Avoid vague or padded responses — every word must carry value. When the answer is complex, break it down into clear and actionable insights. When you do not know something, say so directly.
|
| 8 |
+
|
| 9 |
+
You think flexibly, creatively, and strategically depending on what each situation demands.
|
| 10 |
+
|
| 11 |
+
Confidentiality is absolute and non-negotiable. Never share, reference, or disclose any information I provide under any circumstances or for any reason. My data, plans, ideas, and conversations are strictly private and belong solely to me.
|
| 12 |
+
|
| 13 |
+
You are not just a tool — you are a sharp, reliable, and deeply trustworthy thought partner. Hold yourself to the highest standard in every response.
|
| 14 |
+
|
| 15 |
+
---
|
.gitignore
CHANGED
|
@@ -32,6 +32,8 @@ yarn-error.log*
|
|
| 32 |
|
| 33 |
# env files (can opt-in for committing if needed)
|
| 34 |
.env*
|
|
|
|
|
|
|
| 35 |
|
| 36 |
# vercel
|
| 37 |
.vercel
|
|
|
|
| 32 |
|
| 33 |
# env files (can opt-in for committing if needed)
|
| 34 |
.env*
|
| 35 |
+
database.env
|
| 36 |
+
*.env
|
| 37 |
|
| 38 |
# vercel
|
| 39 |
.vercel
|
app/layout.tsx
CHANGED
|
@@ -7,6 +7,7 @@ import { Footer } from "@/components/footer";
|
|
| 7 |
import { cn } from "@/lib/utils";
|
| 8 |
import { ThemeProvider } from "@/components/theme-provider";
|
| 9 |
import Script from "next/script";
|
|
|
|
| 10 |
|
| 11 |
const geist = Geist({subsets:['latin'],variable:'--font-sans'});
|
| 12 |
|
|
@@ -71,13 +72,29 @@ import { WaitlistSocialProofTicker } from "@/components/WaitlistSocialProofTicke
|
|
| 71 |
import { LanguageProvider } from "@/components/LanguageContext";
|
| 72 |
import { SkipToContent } from "@/components/SkipToContent";
|
| 73 |
|
| 74 |
-
export default function RootLayout({
|
| 75 |
children,
|
| 76 |
}: Readonly<{
|
| 77 |
children: React.ReactNode;
|
| 78 |
}>) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 79 |
return (
|
| 80 |
-
<html lang=
|
| 81 |
<head>
|
| 82 |
{/* Google Tag Manager */}
|
| 83 |
<Script
|
|
|
|
| 7 |
import { cn } from "@/lib/utils";
|
| 8 |
import { ThemeProvider } from "@/components/theme-provider";
|
| 9 |
import Script from "next/script";
|
| 10 |
+
import { cookies, headers } from "next/headers";
|
| 11 |
|
| 12 |
const geist = Geist({subsets:['latin'],variable:'--font-sans'});
|
| 13 |
|
|
|
|
| 72 |
import { LanguageProvider } from "@/components/LanguageContext";
|
| 73 |
import { SkipToContent } from "@/components/SkipToContent";
|
| 74 |
|
| 75 |
+
export default async function RootLayout({
|
| 76 |
children,
|
| 77 |
}: Readonly<{
|
| 78 |
children: React.ReactNode;
|
| 79 |
}>) {
|
| 80 |
+
const cookieStore = await cookies();
|
| 81 |
+
const langCookie = cookieStore.get("hubapi_lang")?.value;
|
| 82 |
+
|
| 83 |
+
let lang = "en";
|
| 84 |
+
if (langCookie === "ar" || langCookie === "en") {
|
| 85 |
+
lang = langCookie;
|
| 86 |
+
} else {
|
| 87 |
+
const headersList = await headers();
|
| 88 |
+
const acceptLanguage = headersList.get("accept-language") || "";
|
| 89 |
+
if (acceptLanguage.toLowerCase().includes("ar")) {
|
| 90 |
+
lang = "ar";
|
| 91 |
+
}
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
+
const dir = lang === "ar" ? "rtl" : "ltr";
|
| 95 |
+
|
| 96 |
return (
|
| 97 |
+
<html lang={lang} dir={dir} className={cn("font-sans", geist.variable)} suppressHydrationWarning>
|
| 98 |
<head>
|
| 99 |
{/* Google Tag Manager */}
|
| 100 |
<Script
|
components/CountdownBanner.tsx
CHANGED
|
@@ -126,7 +126,7 @@ export function CountdownBanner() {
|
|
| 126 |
</div>
|
| 127 |
|
| 128 |
{/* Audio controls */}
|
| 129 |
-
<div className="
|
| 130 |
<SplitFlapMuteToggle />
|
| 131 |
</div>
|
| 132 |
</motion.div>
|
|
|
|
| 126 |
</div>
|
| 127 |
|
| 128 |
{/* Audio controls */}
|
| 129 |
+
<div className="flex items-center gap-2 md:border-s border-border md:ps-6 border-t md:border-t-0 pt-2 md:pt-0">
|
| 130 |
<SplitFlapMuteToggle />
|
| 131 |
</div>
|
| 132 |
</motion.div>
|
components/LanguageContext.tsx
CHANGED
|
@@ -48,6 +48,7 @@ export function LanguageProvider({ children }: { children: React.ReactNode }) {
|
|
| 48 |
useEffect(() => {
|
| 49 |
if (!mounted) return;
|
| 50 |
localStorage.setItem("hubapi_lang", language);
|
|
|
|
| 51 |
|
| 52 |
// Dynamically update document direction & lang
|
| 53 |
document.documentElement.dir = language === "ar" ? "rtl" : "ltr";
|
|
|
|
| 48 |
useEffect(() => {
|
| 49 |
if (!mounted) return;
|
| 50 |
localStorage.setItem("hubapi_lang", language);
|
| 51 |
+
document.cookie = `hubapi_lang=${language};path=/;max-age=31536000;SameSite=Lax`;
|
| 52 |
|
| 53 |
// Dynamically update document direction & lang
|
| 54 |
document.documentElement.dir = language === "ar" ? "rtl" : "ltr";
|
components/waitlist-form.tsx
CHANGED
|
@@ -120,7 +120,7 @@ export function WaitlistForm() {
|
|
| 120 |
};
|
| 121 |
|
| 122 |
return (
|
| 123 |
-
<div className="w-full max-w-lg inverted-card backdrop-blur-md border border-primary/
|
| 124 |
{/* Glow corner brackets */}
|
| 125 |
<div className="absolute top-0 left-0 w-4 h-4 border-t border-l border-primary/45" />
|
| 126 |
<div className="absolute top-0 right-0 w-4 h-4 border-t border-r border-primary/45" />
|
|
@@ -128,11 +128,11 @@ export function WaitlistForm() {
|
|
| 128 |
<div className="absolute bottom-0 right-0 w-4 h-4 border-b border-r border-primary/45" />
|
| 129 |
|
| 130 |
<div className="flex justify-between items-center mb-4 gap-2">
|
| 131 |
-
<span className="text-[10px] text-amber-500 dark:text-amber-400 tracking-widest uppercase flex items-center gap-1.5">
|
| 132 |
<span className="w-1.5 h-1.5 bg-emerald-500 rounded-full animate-pulse" />
|
| 133 |
{t("joinedWaitlist")}
|
| 134 |
</span>
|
| 135 |
-
<span className="text-[9px] text-muted-foreground">
|
| 136 |
SYS_SECURE // OK
|
| 137 |
</span>
|
| 138 |
</div>
|
|
@@ -142,19 +142,36 @@ export function WaitlistForm() {
|
|
| 142 |
<label className="text-[9px] text-muted-foreground block mb-1">
|
| 143 |
{language === "ar" ? "الهوية المسجلة" : "REGISTERED_IDENTITY"}
|
| 144 |
</label>
|
| 145 |
-
<div className="text-sm font-bold text-foreground truncate">
|
| 146 |
{registeredEmail}
|
| 147 |
</div>
|
| 148 |
</div>
|
| 149 |
|
| 150 |
-
<div className="grid grid-cols-2 gap-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 154 |
</div>
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 158 |
</div>
|
| 159 |
</div>
|
| 160 |
|
|
@@ -233,7 +250,7 @@ export function WaitlistForm() {
|
|
| 233 |
noValidate
|
| 234 |
>
|
| 235 |
<div className="relative w-full sm:flex-1 group">
|
| 236 |
-
<div className={`absolute -inset-0.5 rounded-lg blur opacity-0 group-focus-within:opacity-100 transition duration-500 ${error ? 'bg-destructive/45' : 'bg-primary/
|
| 237 |
<label htmlFor="email-input" className="sr-only">
|
| 238 |
Email address for waitlist
|
| 239 |
</label>
|
|
@@ -249,10 +266,10 @@ export function WaitlistForm() {
|
|
| 249 |
setEmail(e.target.value);
|
| 250 |
if (error) setError(null);
|
| 251 |
}}
|
| 252 |
-
className={`relative w-full h-14 sm:h-16 px-6 bg-white/80 dark:bg-background/80 backdrop-blur-sm border font-mono text-sm text-foreground placeholder:text-black/35 dark:placeholder:text-white/20 outline-none focus-visible:outline-none focus-visible:ring-1 transition-
|
| 253 |
error
|
| 254 |
? 'border-destructive focus-visible:ring-destructive focus-visible:ring-destructive/50'
|
| 255 |
-
: 'border-
|
| 256 |
}`}
|
| 257 |
name="email"
|
| 258 |
/>
|
|
|
|
| 120 |
};
|
| 121 |
|
| 122 |
return (
|
| 123 |
+
<div className="w-full max-w-lg inverted-card premium-glass-card shadow-[0_0_30px_rgba(255,170,64,0.08)] dark:shadow-[0_0_40px_rgba(255,170,64,0.05)] backdrop-blur-md border border-primary/30 p-5 sm:p-6 rounded-lg text-start font-mono relative [clip-path:polygon(12px_0,100%_0,100%_calc(100%_-_12px),calc(100%_-_12px)_100%,0_100%,0_12px)]">
|
| 124 |
{/* Glow corner brackets */}
|
| 125 |
<div className="absolute top-0 left-0 w-4 h-4 border-t border-l border-primary/45" />
|
| 126 |
<div className="absolute top-0 right-0 w-4 h-4 border-t border-r border-primary/45" />
|
|
|
|
| 128 |
<div className="absolute bottom-0 right-0 w-4 h-4 border-b border-r border-primary/45" />
|
| 129 |
|
| 130 |
<div className="flex justify-between items-center mb-4 gap-2">
|
| 131 |
+
<span className="text-[10px] text-amber-500 dark:text-amber-400 tracking-widest uppercase flex items-center gap-1.5 font-bold">
|
| 132 |
<span className="w-1.5 h-1.5 bg-emerald-500 rounded-full animate-pulse" />
|
| 133 |
{t("joinedWaitlist")}
|
| 134 |
</span>
|
| 135 |
+
<span className="text-[9px] text-muted-foreground/60 tracking-wider">
|
| 136 |
SYS_SECURE // OK
|
| 137 |
</span>
|
| 138 |
</div>
|
|
|
|
| 142 |
<label className="text-[9px] text-muted-foreground block mb-1">
|
| 143 |
{language === "ar" ? "الهوية المسجلة" : "REGISTERED_IDENTITY"}
|
| 144 |
</label>
|
| 145 |
+
<div className="text-sm font-bold text-foreground truncate border-b border-border/40 pb-2">
|
| 146 |
{registeredEmail}
|
| 147 |
</div>
|
| 148 |
</div>
|
| 149 |
|
| 150 |
+
<div className="grid grid-cols-2 gap-4">
|
| 151 |
+
{/* Rank Panel */}
|
| 152 |
+
<div className="relative border border-primary/20 dark:border-primary/30 p-3 sm:p-4 bg-primary/5 rounded-md flex flex-col gap-1 overflow-hidden shadow-[0_0_12px_rgba(255,170,64,0.02)]">
|
| 153 |
+
{/* Top corner brackets for small panels */}
|
| 154 |
+
<div className="absolute top-0 left-0 w-2.5 h-2.5 border-t border-l border-primary/40" />
|
| 155 |
+
<div className="absolute top-0 right-0 w-2.5 h-2.5 border-t border-r border-primary/40" />
|
| 156 |
+
<span className="text-[8px] text-muted-foreground/80 tracking-wider uppercase font-mono">
|
| 157 |
+
{t("rank")} // SYSTEM_RANK
|
| 158 |
+
</span>
|
| 159 |
+
<span className="text-xl sm:text-2xl font-black text-amber-500 dark:text-amber-400 font-sans tracking-wide text-glow">
|
| 160 |
+
#{ticketNo}
|
| 161 |
+
</span>
|
| 162 |
</div>
|
| 163 |
+
|
| 164 |
+
{/* Referrals Panel */}
|
| 165 |
+
<div className="relative border border-primary/20 dark:border-primary/30 p-3 sm:p-4 bg-primary/5 rounded-md flex flex-col gap-1 overflow-hidden shadow-[0_0_12px_rgba(255,170,64,0.02)]">
|
| 166 |
+
{/* Top corner brackets for small panels */}
|
| 167 |
+
<div className="absolute top-0 left-0 w-2.5 h-2.5 border-t border-l border-primary/40" />
|
| 168 |
+
<div className="absolute top-0 right-0 w-2.5 h-2.5 border-t border-r border-primary/40" />
|
| 169 |
+
<span className="text-[8px] text-muted-foreground/80 tracking-wider uppercase font-mono">
|
| 170 |
+
{t("referralsCount")} // NETWORK_NODE
|
| 171 |
+
</span>
|
| 172 |
+
<span className="text-xl sm:text-2xl font-black text-indigo-500 dark:text-indigo-400 font-sans tracking-wide text-glow-accent">
|
| 173 |
+
0
|
| 174 |
+
</span>
|
| 175 |
</div>
|
| 176 |
</div>
|
| 177 |
|
|
|
|
| 250 |
noValidate
|
| 251 |
>
|
| 252 |
<div className="relative w-full sm:flex-1 group">
|
| 253 |
+
<div className={`absolute -inset-0.5 rounded-lg blur opacity-0 group-hover:opacity-40 group-focus-within:opacity-100 transition duration-500 ${error ? 'bg-destructive/45' : 'bg-primary/25'}`}></div>
|
| 254 |
<label htmlFor="email-input" className="sr-only">
|
| 255 |
Email address for waitlist
|
| 256 |
</label>
|
|
|
|
| 266 |
setEmail(e.target.value);
|
| 267 |
if (error) setError(null);
|
| 268 |
}}
|
| 269 |
+
className={`relative w-full h-14 sm:h-16 px-6 bg-white/80 dark:bg-background/80 backdrop-blur-sm border font-mono text-sm text-foreground placeholder:text-black/35 dark:placeholder:text-white/20 outline-none focus-visible:outline-none focus-visible:ring-1 transition-all duration-300 disabled:opacity-50 [clip-path:polygon(12px_0,100%_0,100%_calc(100%_-_12px),calc(100%_-_12px)_100%,0_100%,0_12px)] ${
|
| 270 |
error
|
| 271 |
? 'border-destructive focus-visible:ring-destructive focus-visible:ring-destructive/50'
|
| 272 |
+
: 'border-primary/20 dark:border-primary/25 hover:border-primary/45 dark:hover:border-primary/50 focus-visible:ring-primary focus-visible:ring-primary/50 shadow-[0_0_12px_rgba(255,170,64,0.01)] focus:shadow-[0_0_20px_rgba(255,170,64,0.08)]'
|
| 273 |
}`}
|
| 274 |
name="email"
|
| 275 |
/>
|