"use client"; import { motion } from "motion/react"; import { MonitorCheck, BookOpen, BarChart3, ArrowUpRight, Hexagon, Zap, Shield, Server, Globe, RefreshCw, Puzzle, } from "lucide-react"; import { useI18n, type TranslationKey } from "@/lib/i18n"; const PLATFORM_URL = "http://192.168.111.90:8016/console/personal"; const SERVICE_URLS: Record = { monitoring: "http://192.168.111.90:8018", docs: "http://192.168.111.90:8087/sinocode/current/", analytics: "http://192.168.111.90:8019", }; /* ═══ Data ═══ */ const SERVICES = [ { key: "monitoring" as const, icon: MonitorCheck, accentVar: "--portal-accent-green", glowColor: "rgba(52,211,153,0.15)", decorIcon: Shield, }, { key: "docs" as const, icon: BookOpen, accentVar: "--portal-accent-violet", glowColor: "rgba(139,92,246,0.15)", decorIcon: Hexagon, }, { key: "analytics" as const, icon: BarChart3, accentVar: "--portal-accent-cyan", glowColor: "rgba(0,229,255,0.15)", decorIcon: Zap, }, ]; interface FeatureItem { icon: typeof Zap; titleKey: TranslationKey; descKey: TranslationKey; } const FEATURES: FeatureItem[] = [ { icon: Zap, titleKey: "portal.features.unified", descKey: "portal.features.unifiedDesc" }, { icon: Shield, titleKey: "portal.features.security", descKey: "portal.features.securityDesc" }, { icon: BarChart3, titleKey: "portal.features.monitor", descKey: "portal.features.monitorDesc" }, { icon: Globe, titleKey: "portal.features.global", descKey: "portal.features.globalDesc" }, { icon: RefreshCw, titleKey: "portal.features.failover", descKey: "portal.features.failoverDesc" }, { icon: Puzzle, titleKey: "portal.features.flexible", descKey: "portal.features.flexibleDesc" }, ]; interface ModelItem { name: string; provider: string; } const MODELS: ModelItem[] = [ { name: "Claude", provider: "Anthropic" }, { name: "GPT", provider: "OpenAI" }, { name: "Gemini", provider: "Google" }, { name: "DeepSeek", provider: "DeepSeek" }, { name: "Grok", provider: "xAI" }, ]; interface ToolItem { name: string; tag: string; } const TOOLS: ToolItem[] = [ { name: "Claude Code", tag: "Anthropic" }, { name: "Codex", tag: "OpenAI" }, { name: "Gemini CLI", tag: "Google" }, { name: "OpenCode", tag: "Community" }, { name: "Droid", tag: "Community" }, ]; const fadeUp = { hidden: { opacity: 0, y: 24 }, visible: { opacity: 1, y: 0, transition: { duration: 0.5, ease: "easeOut" as const } }, }; const stagger = { visible: { transition: { staggerChildren: 0.08 } } }; export default function PortalPage() { const { t } = useI18n(); const i18nMap: Record = { monitoring: { title: t("portal.monitoring"), desc: t("portal.monitoringDesc") }, docs: { title: t("portal.docs"), desc: t("portal.docsDesc") }, analytics: { title: t("portal.analytics"), desc: t("portal.analyticsDesc") }, }; return (
{/* ── Background layers (preserved) ── */}
{Array.from({ length: 6 }).map((_, i) => (
))}
{/* ── 2. HERO ── */}
{t("portal.hero.badge")} SinoCode {t("portal.subtitle")} {t("portal.hero.desc")} {t("portal.hero.cta")} {t("portal.hero.docs")} →
{t("portal.services.tag")}
{t("common.systemOnline")}
{SERVICES.map((service) => { const Icon = service.icon; const info = i18nMap[service.key]; const url = SERVICE_URLS[service.key]; return (
{info.title} {info.desc}
); })}
{/* ── 3. FEATURES ── */}
{t("portal.features.tag")}

{t("portal.features.title")}

{FEATURES.map((f) => { const Icon = f.icon; return (

{t(f.titleKey)}

{t(f.descKey)}

); })}
{/* ── 4. SERVICES ── */}
{t("portal.services.tag")}

{t("portal.services.title")}

{SERVICES.map((service, i) => { const Icon = service.icon; const DecorIcon = service.decorIcon; const info = i18nMap[service.key]; const url = SERVICE_URLS[service.key]; return (

{info.title}

{info.desc}

{t("portal.enter")}
); })}
{/* ── 5. ECOSYSTEM ── */}
{t("portal.ecosystem.tag")}

{t("portal.ecosystem.title")}

{t("portal.ecosystem.models")}

{MODELS.map((m) => (
{m.name}
{m.provider}
))}

{t("portal.ecosystem.tools")}

{t("portal.ecosystem.toolsDesc")}

{TOOLS.map((tool) => (
{tool.name}
{tool.tag}
))}
{/* ── 6. DISCLAIMER ── */}
{t("portal.disclaimer.tag")}

{t("portal.disclaimer.title")}

{t("portal.disclaimer.p1")}

{t("portal.disclaimer.p2")}

{t("portal.disclaimer.copyright")}
{/* ── Footer status ── */}
{t("common.systemOnline")}
); }