From a39782cf8898b22a299b9744e72fc34f8dbd0a48 Mon Sep 17 00:00:00 2001 From: marciobever Date: Mon, 4 May 2026 11:27:21 +0000 Subject: [PATCH] Optimized: Add selected theme CyberTheme.tsx --- src/components/themes/CyberTheme.tsx | 163 +++++++++++++++++++++++++++ 1 file changed, 163 insertions(+) create mode 100644 src/components/themes/CyberTheme.tsx diff --git a/src/components/themes/CyberTheme.tsx b/src/components/themes/CyberTheme.tsx new file mode 100644 index 0000000..de45748 --- /dev/null +++ b/src/components/themes/CyberTheme.tsx @@ -0,0 +1,163 @@ +import { useState, FormEvent } from "react"; +import { Terminal, Crosshair, Code, ShieldAlert, Wifi, Cpu, Eye, LockKeyhole, FolderLock, Database, MapPin, ChevronRight, Share, TriangleAlert, Globe, Share2 } from "lucide-react"; +import { useLanguage } from '../../lib/i18n'; + +const DICT: Record = { + pt: { + back: "/cd root_dir", + heroTitle: "O ZERO-DAY.LOG", + heroDesc: "Registros restritos distribuídos sobre infosec, darknets e vulnerabilidades catastróficas L0.", + btnDecrypt: "DECRYPT_FILE()", + btnTerminal: "ACCESS_TERM()", + feedTitle: "SYS.LOGS_STREAM", + subscribeText: "Canal de transmissão de exploits prioridade vermelha.", + subscribeBtn: "INIT_HANDSHAKE", + sidebarAd: "S.P.O.N.S.O.R", + adDesc: "VPN DESCENTRALIZADA OFUSCADA", + statusMonitor: "SYS_NODE_MONITOR", + articles: [ + { id: "1", tag: "ZERO-DAY", title: "Exploit encontrado na rede principal Ethereum de custódia", excerpt: "Nossa equipe documentou um exploit RCE crítico na infraestrutura nativa.", date: "14:02:00", author: "SysAdmin_01", sev: "CRITICAL" }, + ] + }, + en: { + back: "/cd root_dir", + heroTitle: "THE ZERO-DAY.LOG", + heroDesc: "Restricted distributed logs on infosec, darknets, and catastrophic L0 vulnerabilities.", + btnDecrypt: "DECRYPT_FILE()", + btnTerminal: "ACCESS_TERM()", + feedTitle: "SYS.LOGS_STREAM", + subscribeText: "Red priority exploit transmission channel.", + subscribeBtn: "INIT_HANDSHAKE", + sidebarAd: "S.P.O.N.S.O.R", + adDesc: "OBFUSCATED DECENTRALIZED VPN", + statusMonitor: "SYS_NODE_MONITOR", + articles: [ + { id: "1", tag: "ZERO-DAY", title: "Zero-Day Exploit found on core custodial network", excerpt: "Our analytical team documented a critical RCE exploit within standard core architecture.", date: "14:02:00", author: "SysAdmin_01", sev: "CRITICAL" }, + ] + }, + es: { + back: "/cd root_dir", + heroTitle: "EL ZERO-DAY.LOG", + heroDesc: "Registros distribuidos restringidos sobre infosec y vulnerabilidades catastróficas.", + btnDecrypt: "DESCIFRAR_ARCHIVO()", + btnTerminal: "ACCESO_TERM()", + feedTitle: "FLUJO.SYS_LOGS", + subscribeText: "Canal de distribución de exploits, prioridad roja.", + subscribeBtn: "INICIAR_HANDSHAKE", + sidebarAd: "P.A.T.R.O.C.I.N.A.D.O.R", + adDesc: "VPN DESCENTRALIZADA OFUSCADA", + statusMonitor: "MONITOR_DE_NODOS_SYS", + articles: [ + { id: "1", tag: "ZERO-DAY", title: "Exploit crítico en la red principal de custodia", excerpt: "El equipo documentó un exploit RCE mortal en la infraestructura estándar nativa.", date: "14:02:00", author: "SysAdmin_01", sev: "CRITICAL" }, + ] + } +}; + +export default function CyberTheme({ posts = [], currentArticle, viewState: initialView = "home" }: any) { + const { lang } = useLanguage(); + const ui = (typeof DICT !== "undefined" ? DICT : {})?.[lang] || (typeof DICT !== "undefined" ? DICT : {})?.["pt"]; + const [viewState, setViewState] = useState(initialView); + + const activeArticle = viewState === "article" ? (currentArticle || posts[0]) : null; + const displayPosts = posts.length > 0 ? posts : ui.articles; + + const handleSimulatedAction = (e: any, msg: string) => { + e.preventDefault(); + console.log(`[SYS_PROMPT] ${msg}`); + }; + + const severityColor = (sev: string = "MED") => { + switch (sev) { + case "CRITICAL": return "text-red-500 border-red-500/50 bg-red-500/10"; + case "HIGH": return "text-orange-500 border-orange-500/50 bg-orange-500/10"; + case "MED": return "text-yellow-500 border-yellow-500/50 bg-yellow-500/10"; + default: return "text-[#00ff9d] border-[#00ff9d]/50 bg-[#00ff9d]/10"; + } + }; + + + const safeArticle = currentArticle || posts?.[0] || activeArticle || { + id: 'fallback', + tag: 'SYSTEM', + title: 'Security Event', + excerpt: 'Static page content.', + date: '00:00:00', + author: 'SYSTEM', + sev: 'LOW', + content: '' + }; +return ( +
+
+
setViewState("home")}> +
+ +
+ CYBER_SYS_CORE v9.4 +
+
+ +
+ + +
+
+ + {viewState === "home" ? ( + <> +
+

{ui.heroTitle}

+

{ui.heroDesc}

+
+ + + ) : ( +
+ + {ui.back} + +
+
+ SEVERITY: {safeArticle?.sev || "MED"} + AUTHOR_ID: {safeArticle?.author || "SysAdmin"} +
+

{safeArticle?.title}

+
+
+
+ {safeArticle?.excerpt || safeArticle?.description} +
+
+
+
+ )} +
+
+
+
+ ); +} \ No newline at end of file