Files
Ant-Browser/frontend/src/modules/browser/pages/proxyPool/ProxyPoolHeader.tsx
T
ant-black 70132417ad publish: 1.2.0 snapshot (f3d7ec5)
channel: master

version: 1.2.0

source-ref: D:\code\open_source\ant-chrome master

source-commit: f3d7ec5

merged-public-base: 3d264eb
2026-05-05 18:08:10 +08:00

65 lines
1.7 KiB
TypeScript

import { Button } from '../../../../shared/components'
interface ProxyPoolHeaderProps {
checkingAllIPHealth: boolean
hasURLImportSources: boolean
onCheckAllIPHealth: () => void
onOpenImport: () => void
onRefreshAllSources: () => void
onTestAll: () => void
refreshingAllSources: boolean
testingAll: boolean
totalCount: number
}
export function ProxyPoolHeader({
checkingAllIPHealth,
hasURLImportSources,
onCheckAllIPHealth,
onOpenImport,
onRefreshAllSources,
onTestAll,
refreshingAllSources,
testingAll,
totalCount,
}: ProxyPoolHeaderProps) {
return (
<div className="flex items-center justify-between">
<div>
<h1 className="text-xl font-semibold text-[var(--color-text-primary)]">代理池配置</h1>
<p className="text-sm text-[var(--color-text-muted)] mt-1">管理代理配置,支持 Clash 订阅、HTTPHTTPSSOCKS5</p>
</div>
<div className="flex gap-2">
<Button
size="sm"
variant="secondary"
onClick={onRefreshAllSources}
loading={refreshingAllSources}
disabled={!hasURLImportSources}
>
刷新订阅
</Button>
<Button
size="sm"
variant="secondary"
onClick={onCheckAllIPHealth}
loading={checkingAllIPHealth}
disabled={totalCount === 0}
>
检测IP健康
</Button>
<Button
size="sm"
variant="secondary"
onClick={onTestAll}
loading={testingAll}
disabled={totalCount === 0}
>
测试全部
</Button>
<Button size="sm" onClick={onOpenImport}>导入代理</Button>
</div>
</div>
)
}