10x every page: real interactions, kill fake content, wire everything
- ChatWidget: remove illegal seeds, real localStorage per-handle chat, honest bot replies about market/forum/funds - ForumBoard: wire to real forumState (loadForum/addThread/vote), kill fake stats and illegal seed posts - Home page: privacy features list reflects reality, footer links real - Links: kill all alert() calls, replace fake onions with real clearnet privacy resources + internal route grid - Support: per-coin copied state, env-driven addresses, real BTC addr - Inner circle: wire to AccountContext, tier system from LUX balance, remove hardcoded admin/shadow credentials and fake trading signals - Drop box: real sealed-note localStorage system, honest about no anonymous upload capability, real file picker with receipt - Messages: fully functional per-handle localStorage chat, AI-style contextual bot replies, clear history, honest about local storage - Wallets: pivot from fake PayPal accounts to Digital Access Passes, wire Buy Now to cart via ShopProduct interface - Testimonials: wire submit form to localStorage, interactive star rating 1-10, display submitted reviews above the fold - Raffle: use real merchant BTC address, real per-handle entry storage, honest LUX-only prize disclaimer, fix 0x address - Drops/Lotto: real number picker 1-49 with Quick Pick, ticket submission, match display against drawn numbers, demo disclaimer - Sanctuary: real 4-4-6-2 breathing timer, meditation passage with timer, candle-lighting with localStorage notes - Game: full playable Void Pong with canvas physics, CPU AI, scoring, rally counter, localStorage high score - Security analysis: honest architecture breakdown with real grades, layer-by-layer analysis, practical OPSEC guide, fiction banner - Trust: compute real scores from actual localStorage data (LUX, USD, forum posts, testimonials), FAQ accordion Made-with: Cursor
This commit is contained in:
@@ -1,116 +1,131 @@
|
||||
"use client";
|
||||
|
||||
import { useState, useEffect } from "react";
|
||||
import Link from "next/link";
|
||||
import { useState, useEffect, useCallback } from "react";
|
||||
|
||||
export default function AdminDashboard() {
|
||||
const [btcPrice, setBtcPrice] = useState<string>("64,231.45");
|
||||
const [traffic, setTraffic] = useState<number>(1240);
|
||||
const [activeUsers, setActiveUsers] = useState<number>(42);
|
||||
export default function VaultNetworkPage() {
|
||||
const [btcUsd, setBtcUsd] = useState<number | null>(null);
|
||||
const [btcErr, setBtcErr] = useState<string | null>(null);
|
||||
const [broadcast, setBroadcast] = useState("");
|
||||
const [terminalLines, setTerminalLines] = useState<string[]>([]);
|
||||
const [sessionToken, setSessionToken] = useState("");
|
||||
|
||||
useEffect(() => {
|
||||
setSessionToken(Math.random().toString(36).slice(2, 15));
|
||||
const fetchBtc = useCallback(async () => {
|
||||
try {
|
||||
const res = await fetch("https://api.coingecko.com/api/v3/simple/price?ids=bitcoin&vs_currencies=usd", {
|
||||
cache: "no-store",
|
||||
});
|
||||
if (!res.ok) throw new Error("rate http");
|
||||
const j = (await res.json()) as { bitcoin?: { usd?: number } };
|
||||
const p = j.bitcoin?.usd;
|
||||
if (p && Number.isFinite(p)) {
|
||||
setBtcUsd(p);
|
||||
setBtcErr(null);
|
||||
} else throw new Error("bad payload");
|
||||
} catch {
|
||||
setBtcErr("Could not load BTC/USD");
|
||||
}
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
setSessionToken(
|
||||
typeof crypto !== "undefined" && "randomUUID" in crypto ? crypto.randomUUID().slice(0, 13) : String(Date.now()),
|
||||
);
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
void fetchBtc();
|
||||
const id = setInterval(() => void fetchBtc(), 60_000);
|
||||
return () => clearInterval(id);
|
||||
}, [fetchBtc]);
|
||||
|
||||
useEffect(() => {
|
||||
const interval = setInterval(() => {
|
||||
setBtcPrice((prev) => (parseFloat(prev.replace(',', '')) + (Math.random() - 0.5) * 10).toLocaleString(undefined, { minimumFractionDigits: 2 }));
|
||||
setTraffic((prev) => prev + Math.floor(Math.random() * 5));
|
||||
setActiveUsers((prev) => Math.max(10, prev + Math.floor(Math.random() * 3) - 1));
|
||||
|
||||
// Add random "Tor code" or system logs to terminal
|
||||
const logs = [
|
||||
`[TOR] New circuit established: ${Math.random().toString(16).slice(2, 10)}.onion`,
|
||||
`[NGINX] 200 GET /market from 127.0.0.1`,
|
||||
`[SHADOW] Broadcast packet sent to ${Math.floor(Math.random() * 1000)} nodes`,
|
||||
`[SECURITY] DDoS attempt mitigated from 192.168.${Math.floor(Math.random() * 255)}.${Math.floor(Math.random() * 255)}`,
|
||||
`[BITCOIN] Block ${Math.floor(Math.random() * 800000)} confirmed`
|
||||
`[TOR] circuit refresh (synthetic tick — not your live Tor log)`,
|
||||
`[NGINX] 200 GET /market from 127.0.0.1 (example line)`,
|
||||
`[CYBERLUX] cart shard heartbeat OK`,
|
||||
`[BTC/USD] spot ${btcUsd != null ? `$${btcUsd.toLocaleString(undefined, { maximumFractionDigits: 0 })}` : "…"}`,
|
||||
];
|
||||
setTerminalLines(prev => [...prev.slice(-15), logs[Math.floor(Math.random() * logs.length)]]);
|
||||
}, 2000);
|
||||
setTerminalLines((prev) => [...prev.slice(-15), logs[Math.floor(Math.random() * logs.length)]!]);
|
||||
}, 4500);
|
||||
return () => clearInterval(interval);
|
||||
}, []);
|
||||
}, [btcUsd]);
|
||||
|
||||
const handleBroadcast = () => {
|
||||
localStorage.setItem("shadow_broadcast", broadcast);
|
||||
setTerminalLines(prev => [...prev, `[ADMIN] GLOBAL BROADCAST: ${broadcast}`]);
|
||||
setTerminalLines((prev) => [...prev, `[ADMIN] GLOBAL BROADCAST: ${broadcast || "(empty)"}`]);
|
||||
};
|
||||
|
||||
const btcDisplay =
|
||||
btcUsd != null
|
||||
? btcUsd.toLocaleString(undefined, { minimumFractionDigits: 2, maximumFractionDigits: 2 })
|
||||
: btcErr ?? "…";
|
||||
|
||||
return (
|
||||
<div className="min-h-screen bg-[#050000] text-[#00ff41] font-mono p-6 overflow-hidden flex flex-col">
|
||||
{/* Top Bar */}
|
||||
<header className="flex justify-between items-center border-b border-[#00ff41]/30 pb-4 mb-6">
|
||||
<div className="flex min-h-screen flex-col overflow-hidden bg-[#050000] p-6 font-mono text-[#00ff41]">
|
||||
<header className="mb-6 flex flex-wrap items-center justify-between gap-4 border-b border-[#00ff41]/30 pb-4">
|
||||
<div className="flex items-center gap-4">
|
||||
<div className="w-3 h-3 bg-red-600 rounded-full animate-ping" />
|
||||
<h1 className="text-2xl font-black tracking-tighter uppercase text-white">Shadow Control Center</h1>
|
||||
<div className="h-3 w-3 animate-ping rounded-full bg-red-600" />
|
||||
<h1 className="text-xl font-black tracking-tighter text-white uppercase">Network digest</h1>
|
||||
</div>
|
||||
<div className="flex gap-8 text-[10px] uppercase tracking-widest">
|
||||
<div>Uptime: 142:22:01</div>
|
||||
<div className="text-green-500">Encrypted: AES-256-GCM</div>
|
||||
<div className="flex flex-wrap gap-6 text-[10px] uppercase tracking-widest opacity-80">
|
||||
<div>UI session: {sessionToken || "—"}</div>
|
||||
<div className="text-green-500">Not live Tor admin — decorative console</div>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div className="grid grid-cols-12 gap-6 flex-1">
|
||||
{/* Left Column: Stats & Broadcast */}
|
||||
<div className="col-span-12 lg:col-span-4 space-y-6">
|
||||
<div className="bg-black border border-[#00ff41]/20 p-6 shadow-[0_0_20px_rgba(0,255,65,0.05)]">
|
||||
<h2 className="text-xs uppercase opacity-50 mb-4">Network Vitals</h2>
|
||||
<div className="space-y-4">
|
||||
<div className="flex justify-between items-end">
|
||||
<span className="text-[10px] uppercase">BTC/USD</span>
|
||||
<span className="text-2xl font-bold text-white">${btcPrice}</span>
|
||||
</div>
|
||||
<div className="flex justify-between items-end">
|
||||
<span className="text-[10px] uppercase">Total Nodes</span>
|
||||
<span className="text-2xl font-bold text-white">12,402</span>
|
||||
</div>
|
||||
<div className="flex justify-between items-end">
|
||||
<span className="text-[10px] uppercase">Active Users</span>
|
||||
<span className="text-2xl font-bold text-white">{activeUsers}</span>
|
||||
</div>
|
||||
<div className="grid flex-1 grid-cols-12 gap-6">
|
||||
<div className="col-span-12 space-y-6 lg:col-span-4">
|
||||
<div className="border border-[#00ff41]/20 bg-black p-6 shadow-[0_0_20px_rgba(0,255,65,0.05)]">
|
||||
<h2 className="mb-4 text-xs uppercase opacity-50">Public spot (CoinGecko)</h2>
|
||||
<div className="flex items-end justify-between">
|
||||
<span className="text-[10px] uppercase">BTC/USD</span>
|
||||
<span className="text-2xl font-bold text-white">${btcDisplay}</span>
|
||||
</div>
|
||||
<p className="mt-3 text-[10px] uppercase leading-relaxed text-[#00ff41]/50">
|
||||
Refreshes about every minute. For deposits use{" "}
|
||||
<Link href="/account/add-funds" className="text-[#7dd3fc] underline">
|
||||
Add funds
|
||||
</Link>
|
||||
.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="bg-black border border-red-600/40 p-6 shadow-[0_0_20px_rgba(255,0,0,0.1)]">
|
||||
<h2 className="text-xs uppercase text-red-600 mb-4 font-bold">Global Broadcast</h2>
|
||||
<textarea
|
||||
<div className="border border-red-600/40 bg-black p-6 shadow-[0_0_20px_rgba(255,0,0,0.1)]">
|
||||
<h2 className="mb-4 text-xs font-bold uppercase text-red-600">Broadcast stub</h2>
|
||||
<textarea
|
||||
value={broadcast}
|
||||
onChange={(e) => setBroadcast(e.target.value)}
|
||||
className="w-full bg-[#111] border border-red-900 p-3 text-red-500 text-xs focus:outline-none mb-4 h-24 resize-none"
|
||||
placeholder="Enter message..."
|
||||
className="mb-4 h-24 w-full resize-none border border-red-900 bg-[#111] p-3 text-xs text-red-500 focus:outline-none"
|
||||
placeholder="Message stored in localStorage key shadow_broadcast…"
|
||||
/>
|
||||
<button
|
||||
<button
|
||||
type="button"
|
||||
onClick={handleBroadcast}
|
||||
className="w-full bg-red-900/90 py-2 text-xs font-bold uppercase text-red-100 transition-all hover:bg-red-800"
|
||||
>
|
||||
Execute Broadcast
|
||||
Store broadcast (local)
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div className="bg-black border border-[#00ff41]/20 p-6 h-48 overflow-hidden relative">
|
||||
<h2 className="text-xs uppercase opacity-50 mb-4">Node Map</h2>
|
||||
<div className="absolute inset-0 opacity-20 pointer-events-none bg-[url('https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExNHJ6Z3R6Z3R6Z3R6Z3R6Z3R6Z3R6Z3R6Z3R6Z3R6Z3R6Z3R6Z3ZpZGUmc2lkPWUmdj0xJm5hbWU9Zw/3o7TKMGpxx8G3Xm8qA/giphy.gif')] bg-cover" />
|
||||
<div className="relative z-10 text-[8px] space-y-1">
|
||||
<div>US-EAST-1: ONLINE</div>
|
||||
<div>EU-WEST-2: ONLINE</div>
|
||||
<div>ASIA-SOUTH-1: ONLINE</div>
|
||||
<div className="text-yellow-500">TOR-EXIT-04: LATENCY</div>
|
||||
</div>
|
||||
<div className="relative h-48 overflow-hidden border border-[#00ff41]/20 bg-black p-6">
|
||||
<h2 className="mb-4 text-xs uppercase opacity-50">Node map</h2>
|
||||
<p className="relative z-10 text-[8px] leading-relaxed opacity-80">
|
||||
Decorative. Real topology is Tor + nginx on your host — see README / DEPLOY.md.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Middle Column: Terminal & Live Stream */}
|
||||
<div className="col-span-12 lg:col-span-8 flex flex-col gap-6">
|
||||
<div className="flex-1 bg-black border border-[#00ff41]/20 p-4 font-mono text-[10px] overflow-hidden flex flex-col">
|
||||
<div className="flex justify-between items-center mb-2 border-b border-[#00ff41]/10 pb-2">
|
||||
<span className="uppercase opacity-50">System Terminal</span>
|
||||
<span className="text-green-500 animate-pulse">● LIVE</span>
|
||||
<div className="col-span-12 flex flex-col gap-6 lg:col-span-8">
|
||||
<div className="flex min-h-[200px] flex-1 flex-col overflow-hidden border border-[#00ff41]/20 bg-black p-4 text-[10px]">
|
||||
<div className="mb-2 flex items-center justify-between border-b border-[#00ff41]/10 pb-2">
|
||||
<span className="uppercase opacity-50">Chatter console</span>
|
||||
<span className="animate-pulse text-green-500">● FEED</span>
|
||||
</div>
|
||||
<div className="flex-1 overflow-y-auto space-y-1 scrollbar-hide">
|
||||
<div className="scrollbar-hide flex-1 space-y-1 overflow-y-auto">
|
||||
{terminalLines.map((line, i) => (
|
||||
<div key={i} className={line.includes('[ADMIN]') ? 'text-red-500 font-bold' : ''}>
|
||||
<div key={`${i}-${line.slice(0, 24)}`} className={line.includes("[ADMIN]") ? "font-bold text-red-500" : ""}>
|
||||
{line}
|
||||
</div>
|
||||
))}
|
||||
@@ -118,27 +133,21 @@ export default function AdminDashboard() {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="h-64 bg-black border border-[#00ff41]/20 relative overflow-hidden">
|
||||
<div className="absolute top-2 left-2 z-20 bg-black/80 px-2 py-1 text-[8px] uppercase border border-[#00ff41]/20">
|
||||
Live Feed: Node_05 (Red Room)
|
||||
</div>
|
||||
<div className="absolute inset-0 opacity-40 bg-[url('https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExNHJ6Z3R6Z3R6Z3R6Z3R6Z3R6Z3R6Z3R6Z3R6Z3R6Z3R6Z3R6Z3ZpZGUmc2lkPWUmdj0xJm5hbWU9Zw/oEI9uWUqnW3CeEnwL6/giphy.gif')] bg-cover" />
|
||||
<div className="absolute inset-0 flex items-center justify-center">
|
||||
<div className="text-center">
|
||||
<div className="text-2xl font-black text-white/20 tracking-widest uppercase">No Signal</div>
|
||||
<div className="text-[8px] uppercase opacity-20">Encrypted Stream #8821</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="border border-[#00ff41]/20 bg-black/80 p-4 text-[10px] uppercase tracking-widest opacity-50">
|
||||
<Link href="/dashboard" className="text-[#7dd3fc] hover:underline">
|
||||
Dashboard
|
||||
</Link>
|
||||
{" · "}
|
||||
<Link href="/checkout" className="text-[#7dd3fc] hover:underline">
|
||||
Checkout
|
||||
</Link>
|
||||
{" · "}
|
||||
<Link href="/" className="text-[#7dd3fc] hover:underline">
|
||||
Hub
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Bottom Bar */}
|
||||
<footer className="mt-6 border-t border-[#00ff41]/30 pt-4 flex justify-between items-center text-[8px] uppercase tracking-widest opacity-50">
|
||||
<div>Shadow Network OS v4.0.1-stable</div>
|
||||
<div>Current Session: {sessionToken || "—"}</div>
|
||||
<div className="text-red-500 font-bold">Warning: Unauthorized access is logged</div>
|
||||
</footer>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user