|
| 1 | +import { Button } from "@/components/ui/button"; |
| 2 | +import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; |
| 3 | +import { Badge } from "@/components/ui/badge"; |
| 4 | +import { ArrowRight, Github, Globe, Mail, Shield } from "lucide-react"; |
| 5 | +import { useNavigate } from "react-router-dom"; |
| 6 | +import { useTheme } from "@/components/theme-provider"; |
| 7 | +import { ModeToggle } from "@/components/mode-toggle"; |
| 8 | +import { LanguageToggle } from "@/components/language-toggle"; |
| 9 | + |
| 10 | +export default function Home() { |
| 11 | + const navigate = useNavigate(); |
| 12 | + const { theme } = useTheme(); |
| 13 | + |
| 14 | + const handleGoToManager = () => { |
| 15 | + navigate("/manager"); |
| 16 | + }; |
| 17 | + |
| 18 | + return ( |
| 19 | + <div className="min-h-screen bg-background"> |
| 20 | + {/* Header with theme toggle */} |
| 21 | + <header className="flex items-center justify-between px-4 py-2"> |
| 22 | + <div className="flex items-center"> |
| 23 | + <img |
| 24 | + src={theme === "dark" ? "https://evolution-api.com/files/evo/evolution-logo-white.svg" : "https://evolution-api.com/files/evo/evolution-logo.svg"} |
| 25 | + alt="Evolution API Logo" |
| 26 | + className="h-8" |
| 27 | + /> |
| 28 | + </div> |
| 29 | + <div className="flex items-center gap-4"> |
| 30 | + <LanguageToggle /> |
| 31 | + <ModeToggle /> |
| 32 | + </div> |
| 33 | + </header> |
| 34 | + |
| 35 | + <div className="container mx-auto px-4 py-16"> |
| 36 | + <div className="max-w-4xl mx-auto"> |
| 37 | + {/* Header */} |
| 38 | + <div className="text-center mb-12"> |
| 39 | + <div className="flex items-center justify-center mb-6"> |
| 40 | + <img |
| 41 | + src={theme === "dark" ? "https://evolution-api.com/files/evo/evolution-logo-white.svg" : "https://evolution-api.com/files/evo/evolution-logo.svg"} |
| 42 | + alt="Evolution Manager Logo" |
| 43 | + className="h-10" |
| 44 | + /> |
| 45 | + </div> |
| 46 | + <h1 className="text-4xl font-bold text-foreground mb-4"> |
| 47 | + Evolution Manager v2 |
| 48 | + </h1> |
| 49 | + <p className="text-xl text-muted-foreground mb-6"> |
| 50 | + Modern web interface for Evolution API management |
| 51 | + </p> |
| 52 | + <Badge variant="secondary" className="text-sm px-3 py-1"> |
| 53 | + Version 2.0.0 |
| 54 | + </Badge> |
| 55 | + </div> |
| 56 | + |
| 57 | + {/* Main Card */} |
| 58 | + <Card className="mb-8"> |
| 59 | + <CardHeader> |
| 60 | + <CardTitle className="flex items-center gap-2"> |
| 61 | + <Shield className="w-5 h-5 text-primary" /> |
| 62 | + Welcome to Evolution Manager |
| 63 | + </CardTitle> |
| 64 | + <CardDescription> |
| 65 | + A powerful, modern dashboard for managing your WhatsApp API instances with Evolution API |
| 66 | + </CardDescription> |
| 67 | + </CardHeader> |
| 68 | + <CardContent className="space-y-6"> |
| 69 | + <div className="pt-6 border-t border-border"> |
| 70 | + <div className="flex flex-col sm:flex-row gap-4 justify-center items-center"> |
| 71 | + <Button |
| 72 | + onClick={handleGoToManager} |
| 73 | + size="lg" |
| 74 | + className="px-8 py-3" |
| 75 | + > |
| 76 | + Access Manager Dashboard |
| 77 | + <ArrowRight className="w-4 h-4 ml-2" /> |
| 78 | + </Button> |
| 79 | + </div> |
| 80 | + </div> |
| 81 | + </CardContent> |
| 82 | + </Card> |
| 83 | + |
| 84 | + {/* Links Card */} |
| 85 | + <Card> |
| 86 | + <CardHeader> |
| 87 | + <CardTitle>Resources & Support</CardTitle> |
| 88 | + <CardDescription> |
| 89 | + Get help, contribute, or learn more about Evolution API |
| 90 | + </CardDescription> |
| 91 | + </CardHeader> |
| 92 | + <CardContent> |
| 93 | + <div className="grid md:grid-cols-3 gap-4"> |
| 94 | + <a |
| 95 | + href="https://github.com/EvolutionAPI/evolution-manager-v2" |
| 96 | + target="_blank" |
| 97 | + rel="noopener noreferrer" |
| 98 | + className="flex items-center gap-3 p-4 rounded-lg border border-border hover:bg-accent transition-colors" |
| 99 | + > |
| 100 | + <Github className="w-5 h-5 text-muted-foreground" /> |
| 101 | + <div> |
| 102 | + <div className="font-medium text-foreground">GitHub</div> |
| 103 | + <div className="text-sm text-muted-foreground">Source code</div> |
| 104 | + </div> |
| 105 | + </a> |
| 106 | + |
| 107 | + <a |
| 108 | + href="https://evolution-api.com" |
| 109 | + target="_blank" |
| 110 | + rel="noopener noreferrer" |
| 111 | + className="flex items-center gap-3 p-4 rounded-lg border border-border hover:bg-accent transition-colors" |
| 112 | + > |
| 113 | + <Globe className="w-5 h-5 text-muted-foreground" /> |
| 114 | + <div> |
| 115 | + <div className="font-medium text-foreground">Website</div> |
| 116 | + <div className="text-sm text-muted-foreground">Official site</div> |
| 117 | + </div> |
| 118 | + </a> |
| 119 | + |
| 120 | + <a |
| 121 | + |
| 122 | + className="flex items-center gap-3 p-4 rounded-lg border border-border hover:bg-accent transition-colors" |
| 123 | + > |
| 124 | + <Mail className="w-5 h-5 text-muted-foreground" /> |
| 125 | + <div> |
| 126 | + <div className="font-medium text-foreground">Contact</div> |
| 127 | + <div className="text-sm text-muted-foreground">Get support</div> |
| 128 | + </div> |
| 129 | + </a> |
| 130 | + </div> |
| 131 | + </CardContent> |
| 132 | + </Card> |
| 133 | + |
| 134 | + {/* Footer */} |
| 135 | + <div className="text-center mt-12 text-sm text-muted-foreground"> |
| 136 | + <p>© 2025 Evolution API. Licensed under Apache 2.0 with Evolution API custom conditions.</p> |
| 137 | + </div> |
| 138 | + </div> |
| 139 | + </div> |
| 140 | + </div> |
| 141 | + ); |
| 142 | +} |
0 commit comments