|
| 1 | +import { Card, CardContent, CardHeader, CardTitle, Badge } from '@/components/ui' |
| 2 | +import { Shield, Database, Code, FileText, Globe, Settings } from 'lucide-react' |
| 3 | + |
| 4 | +interface OverviewSectionProps { |
| 5 | + t: any |
| 6 | + nodeTypes: string[] |
| 7 | +} |
| 8 | + |
| 9 | +export const OverviewSection: React.FC<OverviewSectionProps> = ({ t, nodeTypes }) => { |
| 10 | + return ( |
| 11 | + <div className="space-y-4 sm:space-y-6"> |
| 12 | + <Card> |
| 13 | + <CardHeader className="pb-4"> |
| 14 | + <CardTitle className="flex items-center gap-2 text-lg sm:text-xl"> |
| 15 | + <Globe className="h-4 w-4 sm:h-5 sm:w-5" /> |
| 16 | + {t.docs.apiInformation} |
| 17 | + </CardTitle> |
| 18 | + </CardHeader> |
| 19 | + <CardContent className="space-y-4"> |
| 20 | + <div className="grid grid-cols-1 sm:grid-cols-2 gap-4"> |
| 21 | + <div> |
| 22 | + <h4 className="font-semibold mb-2 text-sm sm:text-base">{t.docs.version}</h4> |
| 23 | + <p className="text-muted-foreground text-sm">1.0.0</p> |
| 24 | + </div> |
| 25 | + <div> |
| 26 | + <h4 className="font-semibold mb-2 text-sm sm:text-base">{t.docs.openapi}</h4> |
| 27 | + <p className="text-muted-foreground text-sm">3.1.0</p> |
| 28 | + </div> |
| 29 | + <div className="sm:col-span-2 lg:col-span-1"> |
| 30 | + <h4 className="font-semibold mb-2 text-sm sm:text-base">{t.docs.baseUrl}</h4> |
| 31 | + <p className="text-muted-foreground font-mono text-xs sm:text-sm break-all"> |
| 32 | + https://securechain.dev/api/ |
| 33 | + </p> |
| 34 | + </div> |
| 35 | + <div className="sm:col-span-2 lg:col-span-1"> |
| 36 | + <h4 className="font-semibold mb-2 text-sm sm:text-base">{t.docs.authentication}</h4> |
| 37 | + <p className="text-muted-foreground text-sm">{t.docs.jwtBearerToken}</p> |
| 38 | + </div> |
| 39 | + </div> |
| 40 | + </CardContent> |
| 41 | + </Card> |
| 42 | + |
| 43 | + <div className="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-5 gap-4 sm:gap-6"> |
| 44 | + <Card className="md:col-span-2 xl:col-span-1"> |
| 45 | + <CardHeader className="pb-4"> |
| 46 | + <div className="w-10 h-10 sm:w-12 sm:h-12 bg-blue-500/10 rounded-lg flex items-center justify-center mb-2"> |
| 47 | + <Shield className="h-5 w-5 sm:h-6 sm:w-6 text-blue-500" /> |
| 48 | + </div> |
| 49 | + <CardTitle className="text-base sm:text-lg">{t.docs.authenticationTitle}</CardTitle> |
| 50 | + </CardHeader> |
| 51 | + <CardContent> |
| 52 | + <p className="text-muted-foreground mb-4 text-sm leading-relaxed"> |
| 53 | + {t.docs.authenticationDescription} |
| 54 | + </p> |
| 55 | + <Badge variant="secondary" className="text-xs"> |
| 56 | + 7 {t.docs.endpoints} |
| 57 | + </Badge> |
| 58 | + </CardContent> |
| 59 | + </Card> |
| 60 | + |
| 61 | + <Card className="md:col-span-2 xl:col-span-1"> |
| 62 | + <CardHeader className="pb-4"> |
| 63 | + <div className="w-10 h-10 sm:w-12 sm:h-12 bg-green-500/10 rounded-lg flex items-center justify-center mb-2"> |
| 64 | + <Database className="h-5 w-5 sm:h-6 sm:w-6 text-green-500" /> |
| 65 | + </div> |
| 66 | + <CardTitle className="text-base sm:text-lg">{t.docs.dependencyGraphTitle}</CardTitle> |
| 67 | + </CardHeader> |
| 68 | + <CardContent> |
| 69 | + <p className="text-muted-foreground mb-4 text-sm leading-relaxed"> |
| 70 | + {t.docs.dependencyGraphDescription} |
| 71 | + </p> |
| 72 | + <Badge variant="secondary" className="text-xs"> |
| 73 | + 6 {t.docs.endpoints} |
| 74 | + </Badge> |
| 75 | + </CardContent> |
| 76 | + </Card> |
| 77 | + |
| 78 | + <Card className="md:col-span-2 xl:col-span-1"> |
| 79 | + <CardHeader className="pb-4"> |
| 80 | + <div className="w-10 h-10 sm:w-12 sm:h-12 bg-orange-500/10 rounded-lg flex items-center justify-center mb-2"> |
| 81 | + <FileText className="h-5 w-5 sm:h-6 sm:w-6 text-orange-500" /> |
| 82 | + </div> |
| 83 | + <CardTitle className="text-base sm:text-lg">{t.docs.vexgen.title}</CardTitle> |
| 84 | + </CardHeader> |
| 85 | + <CardContent> |
| 86 | + <p className="text-muted-foreground mb-4 text-sm leading-relaxed"> |
| 87 | + {t.docs.vexgen.description} |
| 88 | + </p> |
| 89 | + <Badge variant="secondary" className="text-xs"> |
| 90 | + 7 {t.docs.endpoints} |
| 91 | + </Badge> |
| 92 | + </CardContent> |
| 93 | + </Card> |
| 94 | + |
| 95 | + <Card className="md:col-span-2 xl:col-span-1"> |
| 96 | + <CardHeader className="pb-4"> |
| 97 | + <div className="w-10 h-10 sm:w-12 sm:h-12 bg-purple-500/10 rounded-lg flex items-center justify-center mb-2"> |
| 98 | + <Code className="h-5 w-5 sm:h-6 sm:w-6 text-purple-500" /> |
| 99 | + </div> |
| 100 | + <CardTitle className="text-base sm:text-lg">{t.docs.fileOperationsTitle}</CardTitle> |
| 101 | + </CardHeader> |
| 102 | + <CardContent> |
| 103 | + <p className="text-muted-foreground mb-4 text-sm leading-relaxed"> |
| 104 | + {t.docs.fileOperationsDescription} |
| 105 | + </p> |
| 106 | + <Badge variant="secondary" className="text-xs"> |
| 107 | + 5 {t.docs.endpoints} |
| 108 | + </Badge> |
| 109 | + </CardContent> |
| 110 | + </Card> |
| 111 | + |
| 112 | + <Card className="md:col-span-2 xl:col-span-1"> |
| 113 | + <CardHeader className="pb-4"> |
| 114 | + <div className="w-10 h-10 sm:w-12 sm:h-12 bg-indigo-500/10 rounded-lg flex items-center justify-center mb-2"> |
| 115 | + <Settings className="h-5 w-5 sm:h-6 sm:w-6 text-indigo-500" /> |
| 116 | + </div> |
| 117 | + <CardTitle className="text-base sm:text-lg">{t.docs.configOperationsTitle}</CardTitle> |
| 118 | + </CardHeader> |
| 119 | + <CardContent> |
| 120 | + <p className="text-muted-foreground mb-4 text-sm leading-relaxed"> |
| 121 | + {t.docs.configOperationsDescription} |
| 122 | + </p> |
| 123 | + <Badge variant="secondary" className="text-xs"> |
| 124 | + 3 {t.docs.endpoints} |
| 125 | + </Badge> |
| 126 | + </CardContent> |
| 127 | + </Card> |
| 128 | + </div> |
| 129 | + |
| 130 | + <Card> |
| 131 | + <CardHeader className="pb-4"> |
| 132 | + <CardTitle className="flex items-center gap-2 text-lg sm:text-xl"> |
| 133 | + <FileText className="h-4 w-4 sm:h-5 sm:w-5" /> |
| 134 | + {t.docs.supportedEcosystems} |
| 135 | + </CardTitle> |
| 136 | + </CardHeader> |
| 137 | + <CardContent> |
| 138 | + <div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 sm:gap-4"> |
| 139 | + {nodeTypes.map(nodeType => ( |
| 140 | + <div key={nodeType} className="flex items-center gap-2 p-3 border rounded-lg"> |
| 141 | + <div className="w-2 h-2 bg-primary rounded-full flex-shrink-0"></div> |
| 142 | + <span className="font-mono text-xs sm:text-sm truncate">{nodeType}</span> |
| 143 | + </div> |
| 144 | + ))} |
| 145 | + </div> |
| 146 | + </CardContent> |
| 147 | + </Card> |
| 148 | + </div> |
| 149 | + ) |
| 150 | +} |
0 commit comments