refactor: reorganize ClientCard props and update CLIENTS data structure

This commit is contained in:
kastov
2025-10-11 18:58:21 +03:00
parent 54803cb085
commit b828c17c39
2 changed files with 15 additions and 15 deletions

View File

@@ -1,8 +1,8 @@
import React from 'react'
import ClientCard from '@site/src/components/ClientCard'
import type { Client, Platform } from '@site/src/data/clients'
import { getClientsByPlatform } from '@site/src/data/clients'
import ClientCard from '@site/src/components/ClientCard'
import React from 'react'
interface ClientsListProps {
platform: Platform
@@ -22,19 +22,17 @@ export default function ClientsList({ platform }: ClientsListProps) {
return (
<ClientCard
key={`${client.id}-${platform}`}
id={`${client.id}-${platform}`}
title={client.name}
description={client.description}
core={client.core}
coreIcon={client.badges?.coreIcon}
logo={client.logo}
author={client.author}
authorLink={client.authorLink}
githubRepo={client.githubRepo}
coreIcon={client?.coreIcon}
description={client.description}
featured={client.badges?.featured}
githubRepo={client.githubRepo}
hwidSupported={client.badges?.hwid}
id={`${client.id}-${platform}`}
key={`${client.id}-${platform}`}
links={links}
logo={client.logo}
title={client.name}
/>
)
})}

View File

@@ -36,10 +36,9 @@ export interface Client {
badges?: {
featured?: boolean
hwid?: boolean
core?: CoreType
coreIcon?: string
}
core?: CoreType
coreIcon?: string
description: string
downloadLinks?: {
android?: string
@@ -406,6 +405,9 @@ export const CLIENTS: Client[] = [
platforms: ['ios', 'macos', 'android', 'windows'],
description: 'Simple and lightweight Xray client.',
logo: '/clients/logo/v2raytun-dark.svg',
badges: {
hwid: true
},
downloadLinks: {
ios: 'https://apps.apple.com/en/app/v2raytun/id6476628951',
android: 'https://play.google.com/store/apps/details?id=com.v2raytun.android',