mirror of
https://github.com/cnlimiter/codex-register.git
synced 2026-05-11 18:10:53 +08:00
feat(config): 合并上传配置并修复debug模式下数据库初始化提示错误
This commit is contained in:
@@ -255,34 +255,72 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Team Manager 配置 -->
|
||||
<!-- Team Manager 服务管理 -->
|
||||
<div class="card" style="margin-top: var(--spacing-lg);">
|
||||
<div class="card-header">
|
||||
<h3>🚀 Team Manager</h3>
|
||||
<span class="hint">配置 Team Manager 账号导入功能</span>
|
||||
<h3>🚀 Team Manager 服务</h3>
|
||||
<button class="btn btn-primary btn-sm" id="add-tm-service-btn">+ 添加服务</button>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form id="tm-form">
|
||||
<div class="card-body" style="padding: 0;">
|
||||
<div class="table-container">
|
||||
<table class="data-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>名称</th>
|
||||
<th>API URL</th>
|
||||
<th style="width:80px;">状态</th>
|
||||
<th style="width:60px;">优先级</th>
|
||||
<th style="width:160px;">操作</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>
|
||||
<input type="checkbox" id="tm-enabled" name="enabled">
|
||||
启用 Team Manager 上传
|
||||
</label>
|
||||
<p class="hint">启用后可在账号管理页面将账号导入 Team Manager 平台</p>
|
||||
<label for="tm-service-name">名称 *</label>
|
||||
<input type="text" id="tm-service-name" placeholder="例如: 主服务" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="tm-api-url">API URL</label>
|
||||
<input type="text" id="tm-api-url" name="api_url" placeholder="例如: https://tm.example.com">
|
||||
<p class="hint">Team Manager 平台的 API 地址</p>
|
||||
<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-api-key">API Key</label>
|
||||
<input type="password" id="tm-api-key" name="api_key" placeholder="留空则保持原值" autocomplete="new-password">
|
||||
<p class="hint">Team Manager 平台的认证 Key</p>
|
||||
<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-btn">🔌 测试连接</button>
|
||||
<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>
|
||||
|
||||
Reference in New Issue
Block a user