feat: codex-register with Sub2API增强 + Playwright引擎
Some checks are pending
Docker Image CI / build-and-push-image (push) Waiting to run
Some checks are pending
Docker Image CI / build-and-push-image (push) Waiting to run
This commit is contained in:
596
templates/settings.html
Normal file
596
templates/settings.html
Normal file
@@ -0,0 +1,596 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>系统设置 - OpenAI 注册系统</title>
|
||||
<link rel="stylesheet" href="/static/css/style.css?v={{ static_version }}">
|
||||
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>⚙️</text></svg>">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<!-- 导航栏 -->
|
||||
<nav class="navbar">
|
||||
<div class="nav-brand">
|
||||
<h1>OpenAI 注册系统</h1>
|
||||
</div>
|
||||
<div class="nav-links">
|
||||
<a href="/" class="nav-link">注册</a>
|
||||
<a href="/accounts" class="nav-link">账号管理</a>
|
||||
<a href="/email-services" class="nav-link">邮箱服务</a>
|
||||
<a href="/payment" class="nav-link">支付</a>
|
||||
<a href="/settings" class="nav-link active">设置</a>
|
||||
<a href="/logout" class="nav-link">退出</a>
|
||||
</div>
|
||||
<button class="theme-toggle" onclick="theme.toggle()" title="切换主题">
|
||||
🌙
|
||||
</button>
|
||||
</nav>
|
||||
|
||||
<!-- 主内容区 -->
|
||||
<main class="main-content">
|
||||
<div class="page-header">
|
||||
<h2>系统设置</h2>
|
||||
<p class="subtitle">配置代理、邮箱服务和系统参数</p>
|
||||
</div>
|
||||
|
||||
<!-- 设置标签页 -->
|
||||
<div class="tabs">
|
||||
<button class="tab-btn active" data-tab="proxy">🌐 代理设置</button>
|
||||
<button class="tab-btn" data-tab="webui">🔒 访问控制</button>
|
||||
<button class="tab-btn" data-tab="upload">☁️ 上传</button>
|
||||
<button class="tab-btn" data-tab="outlook">📮 Outlook配置</button>
|
||||
<button class="tab-btn" data-tab="registration">⚙️ 注册配置</button>
|
||||
<button class="tab-btn" data-tab="email-code">📧 验证码配置</button>
|
||||
<button class="tab-btn" data-tab="database">💾 数据库</button>
|
||||
</div>
|
||||
|
||||
<!-- 代理设置 -->
|
||||
<div class="tab-content active" id="proxy-tab">
|
||||
<!-- 动态代理配置 -->
|
||||
<div class="card" style="margin-top: var(--spacing-lg);">
|
||||
<div class="card-header">
|
||||
<h3>动态代理配置</h3>
|
||||
<span class="hint">通过 API 每次获取新代理 IP,优先级高于代理列表</span>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form id="dynamic-proxy-form">
|
||||
<div class="form-group">
|
||||
<label>
|
||||
<input type="checkbox" id="dynamic-proxy-enabled" name="enabled">
|
||||
启用动态代理
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="dynamic-proxy-api-url">代理 API 地址</label>
|
||||
<input type="text" id="dynamic-proxy-api-url" name="api_url" placeholder="http://api.example.com/get_proxy">
|
||||
<small style="color: var(--text-muted);">每次注册任务启动时调用此 API 获取代理 URL</small>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label for="dynamic-proxy-api-key">API 密钥 (可选)</label>
|
||||
<input type="password" id="dynamic-proxy-api-key" name="api_key" placeholder="留空保持不变" autocomplete="new-password">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="dynamic-proxy-api-key-header">密钥请求头</label>
|
||||
<input type="text" id="dynamic-proxy-api-key-header" name="api_key_header" value="X-API-Key">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="dynamic-proxy-result-field">JSON 字段路径 (可选)</label>
|
||||
<input type="text" id="dynamic-proxy-result-field" name="result_field" placeholder="例如: data.proxy 或留空使用响应原文">
|
||||
<small style="color: var(--text-muted);">若 API 返回 JSON,填写点号分隔的字段路径提取代理 URL;留空则将响应原文作为代理 URL</small>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<button type="submit" class="btn btn-primary">💾 保存设置</button>
|
||||
<button type="button" class="btn btn-secondary" id="test-dynamic-proxy-btn">🔌 测试动态代理</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 代理列表 -->
|
||||
<div class="card" style="margin-top: var(--spacing-lg);">
|
||||
<div class="card-header">
|
||||
<h3>代理列表</h3>
|
||||
<div style="display: flex; gap: var(--spacing-sm);">
|
||||
<button class="btn btn-secondary btn-sm" id="test-all-proxies-btn">🔌 测试全部</button>
|
||||
<button class="btn btn-primary btn-sm" id="add-proxy-btn">➕ 添加代理</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body" style="padding: 0;">
|
||||
<div class="table-container">
|
||||
<table class="data-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 50px;">ID</th>
|
||||
<th>名称</th>
|
||||
<th>类型</th>
|
||||
<th>地址</th>
|
||||
<th style="width: 60px;">默认</th>
|
||||
<th style="width: 80px;">状态</th>
|
||||
<th style="width: 120px;">最后使用</th>
|
||||
<th style="width: 180px;">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="proxies-table">
|
||||
<tr>
|
||||
<td colspan="7">
|
||||
<div class="empty-state">
|
||||
<div class="empty-state-icon">🌐</div>
|
||||
<div class="empty-state-title">暂无代理</div>
|
||||
<div class="empty-state-description">点击"添加代理"按钮添加代理服务器</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 访问控制 -->
|
||||
<div class="tab-content" id="webui-tab">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3>Web UI 访问密码</h3>
|
||||
<span class="hint">用于访问页面的密码,留空表示不修改</span>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form id="webui-settings-form">
|
||||
<div class="form-group">
|
||||
<label for="webui-access-password">访问密码</label>
|
||||
<input type="password" id="webui-access-password" name="access_password" placeholder="留空保持不变" autocomplete="new-password">
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<button type="submit" class="btn btn-primary">💾 保存设置</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 添加代理模态框 -->
|
||||
<div class="modal" id="add-proxy-modal">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 id="proxy-modal-title">添加代理</h3>
|
||||
<button class="modal-close" id="close-proxy-modal">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form id="proxy-item-form">
|
||||
<input type="hidden" id="proxy-item-id">
|
||||
<div class="form-group">
|
||||
<label for="proxy-item-name">名称</label>
|
||||
<input type="text" id="proxy-item-name" name="name" required placeholder="例如:美国代理 1">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label for="proxy-item-type">类型</label>
|
||||
<select id="proxy-item-type" name="type">
|
||||
<option value="http">HTTP</option>
|
||||
<option value="socks5">SOCKS5</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="proxy-item-host">主机地址</label>
|
||||
<input type="text" id="proxy-item-host" name="host" required placeholder="127.0.0.1">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="proxy-item-port">端口</label>
|
||||
<input type="number" id="proxy-item-port" name="port" required placeholder="7890">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label for="proxy-item-username">用户名 (可选)</label>
|
||||
<input type="text" id="proxy-item-username" name="username" autocomplete="off">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="proxy-item-password">密码 (可选)</label>
|
||||
<input type="password" id="proxy-item-password" name="password" autocomplete="new-password">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<button type="button" class="btn btn-secondary" id="cancel-proxy-btn">取消</button>
|
||||
<button type="submit" class="btn btn-primary">💾 保存</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 上传服务设置(CPA + Sub2API + Team Manager) -->
|
||||
<div class="tab-content" id="upload-tab">
|
||||
<!-- CPA 服务管理 -->
|
||||
<div class="card" style="margin-top: var(--spacing-lg);">
|
||||
<div class="card-header">
|
||||
<h3>☁️ CPA 服务</h3>
|
||||
<button class="btn btn-primary btn-sm" id="add-cpa-service-btn">+ 添加服务</button>
|
||||
</div>
|
||||
<div class="card-body" style="padding: 0;">
|
||||
<div class="table-container">
|
||||
<table class="data-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:150px;">名称</th>
|
||||
<th>API URL</th>
|
||||
<th style="width:90px;">代理写入</th>
|
||||
<th style="width:80px;">状态</th>
|
||||
<th style="width:60px;text-align:center;">优先级</th>
|
||||
<th style="width:220px;">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="cpa-services-table">
|
||||
<tr><td colspan="6" style="text-align:center;color:var(--text-muted);padding:20px;">加载中...</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Sub2API 服务管理 -->
|
||||
<div class="card" style="margin-top: var(--spacing-lg);">
|
||||
<div class="card-header">
|
||||
<h3>🔗 Sub2API 服务</h3>
|
||||
<button class="btn btn-primary btn-sm" id="add-sub2api-service-btn">+ 添加服务</button>
|
||||
</div>
|
||||
<div class="card-body" style="padding: 0;">
|
||||
<div class="table-container">
|
||||
<table class="data-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:150px;">名称</th>
|
||||
<th>API URL</th>
|
||||
<th style="width:80px;">状态</th>
|
||||
<th style="width:60px;text-align:center;">优先级</th>
|
||||
<th style="width:220px;">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="sub2api-services-table">
|
||||
<tr><td colspan="5" style="text-align:center;color:var(--text-muted);padding:20px;">加载中...</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Team Manager 服务管理 -->
|
||||
<div class="card" style="margin-top: var(--spacing-lg);">
|
||||
<div class="card-header">
|
||||
<h3>🚀 Team Manager 服务</h3>
|
||||
<button class="btn btn-primary btn-sm" id="add-tm-service-btn">+ 添加服务</button>
|
||||
</div>
|
||||
<div class="card-body" style="padding: 0;">
|
||||
<div class="table-container">
|
||||
<table class="data-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:150px;">名称</th>
|
||||
<th>API URL</th>
|
||||
<th style="width:80px;">状态</th>
|
||||
<th style="width:60px;text-align:center;">优先级</th>
|
||||
<th style="width:220px;">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="tm-services-table">
|
||||
<tr><td colspan="5" style="text-align:center;color:var(--text-muted);padding:20px;">加载中...</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Team Manager 服务编辑模态框 -->
|
||||
<div class="modal" id="tm-service-edit-modal">
|
||||
<div class="modal-content" style="max-width: 500px;">
|
||||
<div class="modal-header">
|
||||
<h3 id="tm-service-modal-title">添加 Team Manager 服务</h3>
|
||||
<button class="modal-close" id="close-tm-service-modal">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form id="tm-service-form">
|
||||
<input type="hidden" id="tm-service-id">
|
||||
<div class="form-group">
|
||||
<label for="tm-service-name">名称 *</label>
|
||||
<input type="text" id="tm-service-name" placeholder="例如: 主服务" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="tm-service-url">API URL *</label>
|
||||
<input type="text" id="tm-service-url" placeholder="https://tm.example.com" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="tm-service-key">API Key</label>
|
||||
<input type="password" id="tm-service-key" placeholder="编辑时留空则保持原值" autocomplete="new-password">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label for="tm-service-priority">优先级</label>
|
||||
<input type="number" id="tm-service-priority" value="0" min="0">
|
||||
<p class="hint">数字越小优先级越高</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<label style="margin-top:10px;display:flex;align-items:center;gap:8px;">
|
||||
<input type="checkbox" id="tm-service-enabled" checked> 启用
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<button type="submit" class="btn btn-primary">💾 保存</button>
|
||||
<button type="button" class="btn btn-secondary" id="test-tm-service-btn">🔌 测试连接</button>
|
||||
<button type="button" class="btn btn-secondary" id="cancel-tm-service-btn">取消</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Sub2API 服务编辑模态框 -->
|
||||
<div class="modal" id="sub2api-service-edit-modal">
|
||||
<div class="modal-content" style="max-width: 500px;">
|
||||
<div class="modal-header">
|
||||
<h3 id="sub2api-service-modal-title">添加 Sub2API 服务</h3>
|
||||
<button class="modal-close" id="close-sub2api-service-modal">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form id="sub2api-service-form">
|
||||
<input type="hidden" id="sub2api-service-id">
|
||||
<div class="form-group">
|
||||
<label for="sub2api-service-name">名称 *</label>
|
||||
<input type="text" id="sub2api-service-name" placeholder="例如: 主服务" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sub2api-service-url">API URL *</label>
|
||||
<input type="text" id="sub2api-service-url" placeholder="http://host" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="sub2api-service-key">API Key</label>
|
||||
<input type="password" id="sub2api-service-key" placeholder="编辑时留空则保持原值" autocomplete="new-password">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label for="sub2api-service-priority">优先级</label>
|
||||
<input type="number" id="sub2api-service-priority" value="0" min="0">
|
||||
<p class="hint">数字越小优先级越高</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<label style="margin-top:10px;display:flex;align-items:center;gap:8px;">
|
||||
<input type="checkbox" id="sub2api-service-enabled" checked> 启用
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<button type="submit" class="btn btn-primary">💾 保存</button>
|
||||
<button type="button" class="btn btn-secondary" id="test-sub2api-service-btn">🔌 测试连接</button>
|
||||
<button type="button" class="btn btn-secondary" id="cancel-sub2api-service-btn">取消</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- CPA 服务编辑模态框 -->
|
||||
<div class="modal" id="cpa-service-edit-modal">
|
||||
<div class="modal-content" style="max-width: 500px;">
|
||||
<div class="modal-header">
|
||||
<h3 id="cpa-service-modal-title">添加 CPA 服务</h3>
|
||||
<button class="modal-close" id="close-cpa-service-modal">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form id="cpa-service-form">
|
||||
<input type="hidden" id="cpa-service-id">
|
||||
<div class="form-group">
|
||||
<label for="cpa-service-name">名称 *</label>
|
||||
<input type="text" id="cpa-service-name" placeholder="例如: 主服务" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="cpa-service-url">API URL *</label>
|
||||
<input type="text" id="cpa-service-url" placeholder="https://cpa.example.com" required>
|
||||
<p class="hint">支持填写根地址、`/v0/management` 或完整的 `/v0/management/auth-files` 地址</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="cpa-service-token">API Token</label>
|
||||
<input type="password" id="cpa-service-token" placeholder="编辑时留空则保持原值" autocomplete="new-password">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label for="cpa-service-priority">优先级</label>
|
||||
<input type="number" id="cpa-service-priority" value="0" min="0">
|
||||
<p class="hint">数字越小优先级越高</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label> </label>
|
||||
<label style="margin-top:10px;display:flex;align-items:center;gap:8px;">
|
||||
<input type="checkbox" id="cpa-service-enabled" checked> 启用
|
||||
</label>
|
||||
<label style="margin-top:10px;display:flex;align-items:center;gap:8px;">
|
||||
<input type="checkbox" id="cpa-service-include-proxy-url"> 写入 auth file 的 <code>proxy_url</code>
|
||||
</label>
|
||||
<p class="hint">开启后,若账号记录了实际使用代理(含动态代理),上传到 CPA 时会一并写入。</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<button type="submit" class="btn btn-primary">💾 保存</button>
|
||||
<button type="button" class="btn btn-secondary" id="test-cpa-service-btn">🔌 测试连接</button>
|
||||
<button type="button" class="btn btn-secondary" id="cancel-cpa-service-btn">取消</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Outlook 配置 -->
|
||||
<div class="tab-content" id="outlook-tab">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3>Outlook OAuth 配置</h3>
|
||||
<span class="hint">配置 Outlook 邮箱 OAuth 认证参数</span>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form id="outlook-settings-form">
|
||||
<div class="form-group">
|
||||
<label for="outlook-default-client-id">默认 Client ID</label>
|
||||
<input type="text" id="outlook-default-client-id" name="default_client_id"
|
||||
placeholder="24d9a0ed-8787-4584-883c-2fd79308940a">
|
||||
<p class="hint">Outlook OAuth 应用的 Client ID。导入账户时未填写 client_id 则使用此默认值。</p>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<button type="submit" class="btn btn-primary">💾 保存设置</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 注册配置 -->
|
||||
<div class="tab-content" id="registration-tab">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3>注册配置</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form id="registration-settings-form">
|
||||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label for="max-retries">最大重试次数</label>
|
||||
<input type="number" id="max-retries" name="max_retries" value="3" min="1" max="10">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="timeout">超时时间 (秒)</label>
|
||||
<input type="number" id="timeout" name="timeout" value="120" min="30" max="600">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="password-length">密码长度</label>
|
||||
<input type="number" id="password-length" name="default_password_length" value="12" min="8" max="32">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label for="sleep-min">最小等待时间 (秒)</label>
|
||||
<input type="number" id="sleep-min" name="sleep_min" value="5" min="1" max="60">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="sleep-max">最大等待时间 (秒)</label>
|
||||
<input type="number" id="sleep-max" name="sleep_max" value="30" min="5" max="120">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-row" style="margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border-color, #e0e0e0);">
|
||||
<div class="form-group">
|
||||
<label for="registration-engine">注册引擎</label>
|
||||
<select id="registration-engine" name="engine">
|
||||
<option value="http">HTTP 引擎(默认)</option>
|
||||
<option value="playwright">Playwright 浏览器引擎</option>
|
||||
</select>
|
||||
<p class="hint">Playwright 使用真实浏览器环境,解决 workspace Cookie 问题</p>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="playwright-pool-size">Playwright 池大小</label>
|
||||
<input type="number" id="playwright-pool-size" name="playwright_pool_size" value="5" min="1" max="20">
|
||||
<p class="hint">并发浏览器上下文数量</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<button type="submit" class="btn btn-primary">💾 保存设置</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 验证码配置 -->
|
||||
<div class="tab-content" id="email-code-tab">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3>验证码等待配置</h3>
|
||||
<span class="hint">配置 Outlook 邮箱验证码获取的超时时间和轮询间隔</span>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form id="email-code-form">
|
||||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label for="email-code-timeout">等待超时 (秒)</label>
|
||||
<input type="number" id="email-code-timeout" name="timeout" value="120" min="30" max="600">
|
||||
<span class="hint">等待验证码的最大时间,建议 60-300 秒</span>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="email-code-poll-interval">轮询间隔 (秒)</label>
|
||||
<input type="number" id="email-code-poll-interval" name="poll_interval" value="3" min="1" max="30">
|
||||
<span class="hint">检查邮箱的时间间隔,建议 2-5 秒</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<button type="submit" class="btn btn-primary">💾 保存设置</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card" style="margin-top: var(--spacing-lg);">
|
||||
<div class="card-header">
|
||||
<h3>验证码获取策略</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<ul class="info-list">
|
||||
<li><strong>渐进式检查</strong>:前 3 次轮询只检查未读邮件,之后检查所有邮件</li>
|
||||
<li><strong>时间戳过滤</strong>:自动跳过 OTP 发送前的旧邮件</li>
|
||||
<li><strong>验证码去重</strong>:避免重复使用同一验证码</li>
|
||||
<li><strong>多策略提取</strong>:主题优先 → 语义匹配 → 兜底匹配</li>
|
||||
<li><strong>发件人验证</strong>:严格验证邮件来自 OpenAI 官方</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 数据库 -->
|
||||
<div class="tab-content" id="database-tab">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<h3>数据库信息</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="info-grid" style="margin-bottom: var(--spacing-lg);">
|
||||
<div class="info-item">
|
||||
<span class="label">数据库大小</span>
|
||||
<span id="db-size" class="value">-</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="label">账号数量</span>
|
||||
<span id="db-accounts" class="value">-</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="label">邮箱服务数量</span>
|
||||
<span id="db-services" class="value">-</span>
|
||||
</div>
|
||||
<div class="info-item">
|
||||
<span class="label">任务记录数量</span>
|
||||
<span id="db-tasks" class="value">-</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-actions">
|
||||
<button class="btn btn-secondary" id="backup-btn">💾 备份数据库</button>
|
||||
<button class="btn btn-warning" id="cleanup-btn">🧹 清理过期数据</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<script src="/static/js/utils.js?v={{ static_version }}"></script>
|
||||
<script src="/static/js/settings.js?v={{ static_version }}"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user