CareerBot/templates/admin/tokens.html
ln0422 96997daed0 Initial commit: CareerBot full-stack career showcase with AI chatbot
- FastAPI backend with SQLAlchemy ORM and SQLite
- AI chatbot with OpenAI-compatible LLM integration (SSE streaming)
- Admin panel for content management, LLM config, token management
- Anonymous access with 3-question limit, token-based access control
- Recruiter intent detection with admin notification
- Resume generator (JD-based, Markdown to Word export)
- Chinese localized public interface

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-07 20:36:38 +08:00

80 lines
3.4 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>CareerBot Admin - Access Tokens</title>
<link rel="stylesheet" href="/static/css/style.css">
</head>
<body>
<div class="admin-layout">
<aside class="admin-sidebar">
<div class="logo">CareerBot Admin</div>
<nav>
<a href="/admin/dashboard"><span class="icon">&#9632;</span> Dashboard</a>
<a href="/admin/profile"><span class="icon">&#9786;</span> Profile</a>
<a href="/admin/education"><span class="icon">&#9734;</span> Education</a>
<a href="/admin/experience"><span class="icon">&#9998;</span> Experience</a>
<a href="/admin/skills"><span class="icon">&#9733;</span> Skills</a>
<a href="/admin/tokens"><span class="icon">&#9911;</span> Access Tokens</a>
<a href="/admin/messages"><span class="icon">&#9993;</span> Messages <span class="nav-badge" id="nav-badge" style="display:none;"></span></a>
<a href="/admin/llm-config"><span class="icon">&#9881;</span> LLM Config</a>
<a href="/admin/resume"><span class="icon">&#9997;</span> Resume Gen</a>
<a href="#" onclick="adminLogout()"><span class="icon">&#8594;</span> Logout</a>
</nav>
</aside>
<main class="admin-content">
<div class="admin-header">
<h2>Access Tokens</h2>
<button class="btn btn-primary" onclick="generateToken()">+ Generate Token</button>
</div>
<div class="admin-card">
<table class="data-table">
<thead><tr><th>Token</th><th>Note</th><th>Questions</th><th>Status</th><th>Created</th><th>Actions</th></tr></thead>
<tbody id="tokens-tbody"></tbody>
</table>
</div>
</main>
</div>
<!-- Edit Token Modal -->
<div class="modal-overlay" id="token-modal">
<div class="modal" style="max-width:480px;">
<div class="modal-header">
<h3>Edit Token</h3>
<button onclick="closeModal('token-modal')">&times;</button>
</div>
<div class="modal-body">
<input type="hidden" id="token-edit-id">
<div class="form-group">
<label>Note</label>
<input type="text" id="token-edit-note" placeholder="e.g. Recruiter from Company X">
</div>
<div class="form-group">
<label>Max Questions</label>
<input type="number" id="token-edit-max" min="1" value="10">
</div>
<div class="form-group">
<label>Used Questions</label>
<input type="number" id="token-edit-used" min="0" value="0">
<small style="color:#64748b;">Set to 0 to reset the counter and allow more questions.</small>
</div>
<div class="form-group">
<label>Status</label>
<select id="token-edit-active">
<option value="true">Active</option>
<option value="false">Inactive</option>
</select>
</div>
</div>
<div class="modal-footer">
<button class="btn" onclick="closeModal('token-modal')">Cancel</button>
<button class="btn btn-primary" onclick="saveToken()">Save</button>
</div>
</div>
</div>
<script src="/static/js/admin.js"></script>
</body>
</html>