feat: add Team Auto Registration page for batch creation and management of ChatGPT Team accounts.
This commit is contained in:
@@ -164,14 +164,37 @@ func checkAndAutoAdd() {
|
||||
}
|
||||
}
|
||||
|
||||
// 读取代理配置
|
||||
proxyURL := ""
|
||||
replenishUseProxy := false
|
||||
if val, _ := database.Instance.GetConfig("monitor_replenish_use_proxy"); val == "true" {
|
||||
replenishUseProxy = true
|
||||
}
|
||||
if replenishUseProxy {
|
||||
proxyURL = config.Global.DefaultProxy
|
||||
}
|
||||
|
||||
// 读取浏览器类型配置
|
||||
browserType := "rod"
|
||||
if val, _ := database.Instance.GetConfig("monitor_browser_type"); val != "" {
|
||||
browserType = val
|
||||
}
|
||||
|
||||
req := TeamProcessRequest{
|
||||
Owners: reqOwners,
|
||||
MembersPerTeam: 4,
|
||||
ConcurrentTeams: 2,
|
||||
IncludeOwner: false,
|
||||
Headless: true,
|
||||
BrowserType: "rod", // 默认使用 rod
|
||||
Proxy: "", // 不使用代理
|
||||
BrowserType: browserType,
|
||||
Proxy: proxyURL,
|
||||
}
|
||||
|
||||
// 输出代理使用状态日志
|
||||
if proxyURL != "" {
|
||||
logger.Info(fmt.Sprintf("自动补号: 使用代理 %s", proxyURL), "", "auto-add")
|
||||
} else {
|
||||
logger.Info("自动补号: 未使用代理", "", "auto-add")
|
||||
}
|
||||
|
||||
// 初始化状态
|
||||
@@ -186,7 +209,7 @@ func checkAndAutoAdd() {
|
||||
// 异步执行
|
||||
go runTeamProcess(req)
|
||||
|
||||
logger.Success(fmt.Sprintf("自动补号任务已启动: %d 个 Team", actualTeams), "", "auto-add")
|
||||
logger.Success(fmt.Sprintf("自动补号任务已启动: %d 个 Team (浏览器: %s)", actualTeams, browserType), "", "auto-add")
|
||||
}
|
||||
|
||||
// getS2AAccountCount 获取 S2A 当前账号数量
|
||||
|
||||
@@ -414,7 +414,7 @@ export default function TeamReg() {
|
||||
</Card>
|
||||
|
||||
{/* 实时日志 */}
|
||||
<Card className="glass-card lg:col-span-2 flex flex-col">
|
||||
<Card className="glass-card lg:col-span-2">
|
||||
<CardHeader>
|
||||
<CardTitle className="flex items-center gap-2">
|
||||
<Terminal className="h-5 w-5 text-green-500" />
|
||||
@@ -448,10 +448,10 @@ export default function TeamReg() {
|
||||
</button>
|
||||
</div>
|
||||
</CardHeader>
|
||||
<CardContent className="flex-1 flex flex-col">
|
||||
<CardContent>
|
||||
<div
|
||||
ref={logsContainerRef}
|
||||
className="min-h-[400px] flex-1 overflow-y-auto bg-slate-900 rounded-lg p-4 font-mono text-sm"
|
||||
className="h-[500px] overflow-y-auto bg-slate-900 rounded-lg p-4 font-mono text-sm"
|
||||
>
|
||||
{logs.length === 0 ? (
|
||||
<div className="flex items-center justify-center h-full text-slate-500">
|
||||
|
||||
Reference in New Issue
Block a user