import { motion } from "framer-motion"; import { Bot, FolderCode, BarChart, ServerCog, FileText, Settings, Network, Router, Zap, FolderOpen, Loader2 } from "lucide-react"; import { useTranslation } from "@/hooks/useTranslation"; import { Button } from "@/components/ui/button"; import { ClaudiaLogoMinimal } from "@/components/ClaudiaLogo"; import { useState } from "react"; interface WelcomePageProps { onNavigate: (view: string) => void; onNewSession: () => void; onSmartQuickStart?: () => void; } export function WelcomePage({ onNavigate, onNewSession, onSmartQuickStart }: WelcomePageProps) { const { t } = useTranslation(); const [isCreatingSmartSession, setIsCreatingSmartSession] = useState(false); const mainFeatures = [ { id: "relay-stations", icon: Network, title: t("welcome.relayStationManagement"), subtitle: t("welcome.relayStationManagementDesc"), color: "text-orange-500", bgColor: "bg-orange-500/10", view: "relay-stations" }, { id: "agents", icon: Bot, title: t("welcome.agentManagement"), subtitle: t("welcome.agentManagementDesc"), color: "text-orange-500", bgColor: "bg-orange-500/10", view: "cc-agents" }, { id: "projects", icon: FolderCode, title: t("welcome.projectManagement"), subtitle: t("welcome.projectManagementDesc"), color: "text-orange-500", bgColor: "bg-orange-500/10", view: "projects" } ]; const bottomFeatures = [ { id: "usage", icon: BarChart, title: t("welcome.usageStatistics"), subtitle: t("welcome.usageStatisticsDesc"), color: "text-orange-500", bgColor: "bg-orange-500/10", view: "usage-dashboard" }, { id: "mcp", icon: ServerCog, title: t("welcome.mcpBroker"), subtitle: t("welcome.mcpBrokerDesc"), color: "text-orange-500", bgColor: "bg-orange-500/10", view: "mcp" }, { id: "ccr-router", icon: Router, title: t("welcome.ccrRouter"), subtitle: t("welcome.ccrRouterDesc"), color: "text-orange-500", bgColor: "bg-orange-500/10", view: "ccr-router" }, { id: "prompt-files", icon: FileText, title: t("welcome.promptFiles"), subtitle: t("welcome.promptFilesDesc"), color: "text-orange-500", bgColor: "bg-orange-500/10", view: "prompt-files" }, { id: "settings", icon: Settings, title: t("welcome.settings"), subtitle: t("welcome.settingsDesc"), color: "text-orange-500", bgColor: "bg-orange-500/10", view: "settings" } ]; const handleCardClick = (view: string) => { onNavigate(view); }; const handleButtonClick = () => { onNewSession(); }; const handleSmartQuickStartClick = async () => { if (!onSmartQuickStart) return; setIsCreatingSmartSession(true); try { await onSmartQuickStart(); } finally { setIsCreatingSmartSession(false); } }; return (
{t("app.tagline")}
{feature.subtitle}
{feature.subtitle}