mirror of
https://github.com/VaalaCat/frp-panel.git
synced 2025-10-05 23:37:09 +08:00
feat: i18n
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
"use client"
|
||||
|
||||
import React from 'react'
|
||||
import { Combobox } from './combobox'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
export interface ProxySelectorProps {
|
||||
proxyName?: string
|
||||
@@ -7,12 +10,23 @@ export interface ProxySelectorProps {
|
||||
proxyNames: string[]
|
||||
}
|
||||
|
||||
export const ProxySelector: React.FC<ProxySelectorProps> = ({ proxyName, proxyNames ,setProxyname }) => {
|
||||
return <Combobox
|
||||
dataList={proxyNames.map((name) => ({ value: name, label: name }))}
|
||||
value={proxyName}
|
||||
setValue={setProxyname}
|
||||
notFoundText="未找到隧道"
|
||||
placeholder="隧道名称"
|
||||
/>
|
||||
export const ProxySelector: React.FC<ProxySelectorProps> = ({
|
||||
proxyName,
|
||||
proxyNames,
|
||||
setProxyname
|
||||
}) => {
|
||||
const { t } = useTranslation()
|
||||
|
||||
return (
|
||||
<Combobox
|
||||
dataList={proxyNames.map((name) => ({
|
||||
value: name,
|
||||
label: name
|
||||
}))}
|
||||
value={proxyName}
|
||||
setValue={setProxyname}
|
||||
notFoundText={t('selector.proxy.notFound')}
|
||||
placeholder={t('selector.proxy.placeholder')}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user