feat: Implement batch team owner processing with dedicated upload, configuration, and monitoring pages and backend services.
This commit is contained in:
@@ -72,6 +72,7 @@ export default function Upload() {
|
||||
const [browserType, setBrowserType] = useState<'chromedp' | 'rod'>('chromedp')
|
||||
const [proxy, setProxy] = useState('')
|
||||
const [includeOwner, setIncludeOwner] = useState(false) // 母号也入库
|
||||
const [processCount, setProcessCount] = useState(0) // 处理数量,0表示全部
|
||||
|
||||
const hasConfig = config.s2a.apiBase && config.s2a.adminKey
|
||||
|
||||
@@ -177,6 +178,7 @@ export default function Upload() {
|
||||
headless: true, // 始终使用无头模式
|
||||
proxy,
|
||||
include_owner: includeOwner, // 母号也入库
|
||||
process_count: processCount, // 处理数量,0表示全部
|
||||
}),
|
||||
})
|
||||
|
||||
@@ -192,7 +194,7 @@ export default function Upload() {
|
||||
alert('启动失败')
|
||||
}
|
||||
setLoading(false)
|
||||
}, [stats, membersPerTeam, concurrentTeams, browserType, proxy, includeOwner, fetchStatus])
|
||||
}, [stats, membersPerTeam, concurrentTeams, browserType, proxy, includeOwner, processCount, fetchStatus])
|
||||
|
||||
// 停止处理
|
||||
const handleStop = useCallback(async () => {
|
||||
@@ -371,6 +373,37 @@ export default function Upload() {
|
||||
</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent className="space-y-4">
|
||||
{/* 处理数量设置 */}
|
||||
<div>
|
||||
<label className="block text-sm font-medium text-slate-700 dark:text-slate-300 mb-2">
|
||||
处理母号数量
|
||||
</label>
|
||||
<div className="flex gap-2">
|
||||
<Input
|
||||
type="number"
|
||||
min={1}
|
||||
max={stats?.valid || 100}
|
||||
value={processCount || ''}
|
||||
onChange={(e) => setProcessCount(Number(e.target.value) || 0)}
|
||||
disabled={isRunning}
|
||||
placeholder="输入数量"
|
||||
className="flex-1"
|
||||
/>
|
||||
<Button
|
||||
variant={processCount === 0 ? 'primary' : 'outline'}
|
||||
size="sm"
|
||||
onClick={() => setProcessCount(0)}
|
||||
disabled={isRunning}
|
||||
className="whitespace-nowrap"
|
||||
>
|
||||
全部 ({stats?.valid || 0})
|
||||
</Button>
|
||||
</div>
|
||||
<p className="text-xs text-slate-500 mt-1">
|
||||
{processCount > 0 ? `将处理 ${Math.min(processCount, stats?.valid || 0)} 个母号` : `将处理全部 ${stats?.valid || 0} 个母号`}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-2 gap-3">
|
||||
<Input
|
||||
label="每个 Team 成员数"
|
||||
|
||||
Reference in New Issue
Block a user