forked from QuantumNous/new-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfeatures.tsx
More file actions
241 lines (229 loc) · 8.28 KB
/
Copy pathfeatures.tsx
File metadata and controls
241 lines (229 loc) · 8.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
/*
Copyright (C) 2023-2026 QuantumNous
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import {
Zap,
Shield,
Globe,
Code,
Gauge,
DollarSign,
Users,
HeartHandshake,
} from 'lucide-react'
import { useTranslation } from 'react-i18next'
import { AnimateInView } from '@/components/animate-in-view'
interface FeaturesProps {
className?: string
}
export function Features(_props: FeaturesProps) {
const { t } = useTranslation()
const features = [
{
id: 'fast',
num: '01',
title: t('Lightning Fast'),
desc: t(
'Optimized network architecture ensures millisecond response times'
),
span: 'md:col-span-2',
icon: <Zap className='size-4 text-blue-400' />,
visual: (
<div className='mt-4 grid grid-cols-3 gap-2'>
{['OpenAI', 'Claude', 'Gemini', 'DeepSeek', 'Qwen', 'Llama'].map(
(name) => (
<div
key={name}
className='border-border/30 bg-muted/20 text-muted-foreground flex items-center justify-center rounded-lg border px-3 py-2 text-xs transition-colors duration-300 hover:border-blue-500/30 hover:bg-blue-500/5'
>
{name}
</div>
)
)}
</div>
),
},
{
id: 'secure',
num: '02',
title: t('Secure & Reliable'),
desc: t(
'Enterprise-grade security with comprehensive permission management'
),
span: 'md:col-span-1',
icon: <Shield className='size-4 text-emerald-400' />,
visual: (
<div className='mt-4 flex items-center justify-center'>
<div className='relative'>
<div className='flex size-16 items-center justify-center rounded-2xl border border-emerald-500/20 bg-emerald-500/5'>
<Shield
className='size-7 text-emerald-500/70'
strokeWidth={1.5}
/>
</div>
<div className='absolute -top-1 -right-1 flex size-4 items-center justify-center rounded-full bg-emerald-500'>
<svg
className='size-2.5 text-white'
fill='none'
viewBox='0 0 24 24'
stroke='currentColor'
strokeWidth={3}
>
<path
strokeLinecap='round'
strokeLinejoin='round'
d='m4.5 12.75 6 6 9-13.5'
/>
</svg>
</div>
</div>
</div>
),
},
{
id: 'global',
num: '03',
title: t('Global Coverage'),
desc: t('Multi-region deployment for stable global access'),
span: 'md:col-span-1',
icon: <Globe className='size-4 text-violet-400' />,
visual: (
<div className='mt-4 space-y-2'>
{[t('Load Balancing'), t('Rate Limiting'), t('Cost Tracking')].map(
(step, i) => (
<div key={step} className='flex items-center gap-2'>
<div
className={`flex size-6 items-center justify-center rounded-full text-[10px] font-bold ${
i === 1
? 'border border-blue-500/30 bg-blue-500/20 text-blue-500'
: 'border-border/40 bg-muted text-muted-foreground border'
}`}
>
{i + 1}
</div>
<div className='bg-border/40 h-px flex-1' />
<span className='text-muted-foreground text-xs'>{step}</span>
</div>
)
)}
</div>
),
},
{
id: 'developer',
num: '04',
title: t('Developer Friendly'),
desc: t('Compatible API routes for common AI application workflows'),
span: 'md:col-span-2',
icon: <Code className='size-4 text-amber-400' />,
visual: (
<div className='mt-4 flex items-center gap-3'>
<div className='flex -space-x-2'>
{['API', 'SDK', 'CLI', 'Docs'].map((n) => (
<div
key={n}
className='border-background from-muted to-muted/60 text-muted-foreground flex size-8 items-center justify-center rounded-full border-2 bg-gradient-to-br text-[9px] font-bold'
>
{n}
</div>
))}
</div>
<div className='text-muted-foreground flex items-center gap-1.5 text-xs'>
<Code className='size-3.5 text-blue-500' />
{t('Multi-protocol Compatible')}
</div>
</div>
),
},
]
const additionalFeatures = [
{
icon: <Gauge className='size-5' strokeWidth={1.5} />,
title: t('High Performance'),
desc: t('Support for high concurrency with automatic load balancing'),
},
{
icon: <DollarSign className='size-5' strokeWidth={1.5} />,
title: t('Transparent Billing'),
desc: t('Pay-as-you-go with real-time usage monitoring'),
},
{
icon: <Users className='size-5' strokeWidth={1.5} />,
title: t('Team Collaboration'),
desc: t('Multi-user management with flexible permission allocation'),
},
{
icon: <HeartHandshake className='size-5' strokeWidth={1.5} />,
title: t('Open Source'),
desc: t('Community driven, self-hosted, and extensible'),
},
]
return (
<section className='relative z-10 px-6 py-24 md:py-32'>
<div className='mx-auto max-w-6xl'>
<AnimateInView className='mb-16 max-w-lg'>
<p className='text-muted-foreground mb-3 text-xs font-medium tracking-widest uppercase'>
{t('Core Features')}
</p>
<h2 className='text-2xl leading-tight font-bold tracking-tight md:text-3xl'>
{t('Built for developers,')}
<br />
{t('designed for scale')}
</h2>
</AnimateInView>
{/* Bento grid */}
<div className='border-border/40 bg-border/40 grid gap-px overflow-hidden rounded-xl border md:grid-cols-3'>
{features.map((f, i) => (
<AnimateInView
key={f.id}
delay={i * 100}
animation='scale-in'
className={`bg-background group hover:bg-muted/20 p-7 transition-colors duration-300 md:p-8 ${f.span}`}
>
<div className='mb-3 flex items-center gap-3'>
<span className='border-border/40 bg-muted text-muted-foreground flex size-7 items-center justify-center rounded-md border text-[10px] font-semibold tabular-nums'>
{f.num}
</span>
<h3 className='text-sm font-semibold'>{f.title}</h3>
</div>
<p className='text-muted-foreground text-sm leading-relaxed'>
{f.desc}
</p>
{f.visual}
</AnimateInView>
))}
</div>
{/* Additional features row */}
<div className='mt-12 grid grid-cols-2 gap-8 md:grid-cols-4 md:gap-12'>
{additionalFeatures.map((f, i) => (
<AnimateInView
key={f.title}
delay={i * 100}
animation='fade-up'
className='flex flex-col items-center text-center'
>
<div className='text-muted-foreground border-border/50 bg-muted/30 group-hover:text-foreground mb-3 flex size-12 items-center justify-center rounded-xl border transition-colors'>
{f.icon}
</div>
<h3 className='mb-1.5 text-sm font-semibold'>{f.title}</h3>
<p className='text-muted-foreground max-w-[200px] text-xs leading-relaxed'>
{f.desc}
</p>
</AnimateInView>
))}
</div>
</div>
</section>
)
}