mirror of
https://github.com/cnlimiter/codex-register.git
synced 2026-05-10 17:42:51 +08:00
274 lines
14 KiB
HTML
274 lines
14 KiB
HTML
<!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">
|
||
<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="/settings" class="nav-link active">设置</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="registration">⚙️ 注册配置</button>
|
||
<button class="tab-btn" data-tab="database">💾 数据库</button>
|
||
</div>
|
||
|
||
<!-- 代理设置 -->
|
||
<div class="tab-content active" id="proxy-tab">
|
||
<!-- 默认代理配置 -->
|
||
<div class="card">
|
||
<div class="card-header">
|
||
<h3>默认代理配置</h3>
|
||
<span class="hint">当代理列表为空时使用此配置</span>
|
||
</div>
|
||
<div class="card-body">
|
||
<form id="proxy-form">
|
||
<div class="form-group">
|
||
<label>
|
||
<input type="checkbox" id="proxy-enabled" name="enabled">
|
||
启用代理
|
||
</label>
|
||
</div>
|
||
|
||
<div class="form-row">
|
||
<div class="form-group">
|
||
<label for="proxy-type">代理类型</label>
|
||
<select id="proxy-type" name="type">
|
||
<option value="http">HTTP</option>
|
||
<option value="socks5">SOCKS5</option>
|
||
</select>
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label for="proxy-host">主机地址</label>
|
||
<input type="text" id="proxy-host" name="host" value="127.0.0.1">
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label for="proxy-port">端口</label>
|
||
<input type="number" id="proxy-port" name="port" value="7890">
|
||
</div>
|
||
</div>
|
||
|
||
<div class="form-row">
|
||
<div class="form-group">
|
||
<label for="proxy-username">用户名 (可选)</label>
|
||
<input type="text" id="proxy-username" name="username" autocomplete="off">
|
||
</div>
|
||
|
||
<div class="form-group">
|
||
<label for="proxy-password">密码 (可选)</label>
|
||
<input type="password" id="proxy-password" name="password" autocomplete="new-password">
|
||
</div>
|
||
</div>
|
||
|
||
<div class="form-actions">
|
||
<button type="submit" class="btn btn-primary">💾 保存设置</button>
|
||
<button type="button" class="btn btn-secondary" id="test-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: 80px;">状态</th>
|
||
<th style="width: 120px;">最后使用</th>
|
||
<th style="width: 150px;">操作</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="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>
|
||
|
||
<!-- 注册配置 -->
|
||
<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-actions">
|
||
<button type="submit" class="btn btn-primary">💾 保存设置</button>
|
||
</div>
|
||
</form>
|
||
</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"></script>
|
||
<script src="/static/js/settings.js"></script>
|
||
</body>
|
||
</html>
|