This commit is contained in:
2026-02-23 23:50:04 +08:00
commit 084d3b0faf
45 changed files with 4090 additions and 0 deletions

View File

@@ -0,0 +1,85 @@
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>待审核用户 · lv8girl</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
--bg: #0f0f1a; --surface: #1a1a2f; --surface-light: #252540; --border: #2d2d4a;
--text: #e0e0f0; --text-soft: #b0b0d0; --text-hint: #8080a0;
--primary: #c5a572; --gradient: linear-gradient(135deg, #c5a572, #9a7e5a);
--sidebar-width: 220px;
}
body { background: var(--bg); color: var(--text); font-family: -apple-system, 'Segoe UI', 'PingFang SC', sans-serif; }
.admin-wrapper { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-width); background: var(--surface); border-right: 1px solid var(--border); padding: 20px 0; position: sticky; top: 0; height: 100vh; }
.sidebar-header { padding: 0 20px 20px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.sidebar-header .logo { font-size: 1.6rem; font-weight: 800; background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.sidebar-header p { color: var(--text-soft); font-size: 0.85rem; }
.sidebar-menu { list-style: none; }
.sidebar-menu li { margin: 5px 0; }
.sidebar-menu a { display: block; padding: 10px 20px; color: var(--text-soft); text-decoration: none; border-left: 4px solid transparent; }
.sidebar-menu a:hover, .sidebar-menu a.active { background: var(--surface-light); border-left-color: var(--primary); color: var(--primary); }
.sidebar-menu .separator { height: 1px; background: var(--border); margin: 15px 20px; }
.main-content { flex: 1; padding: 20px 30px; }
.top-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.page-title { font-size: 1.8rem; font-weight: 600; color: var(--primary); }
.user-info span { background: var(--surface-light); padding: 6px 16px; border-radius: 30px; }
.message { background: var(--surface-light); border-left: 4px solid var(--primary); padding: 12px 20px; margin-bottom: 20px; border-radius: 8px; }
.table-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
table { width: 100%; border-collapse: collapse; }
th { background: var(--surface-light); padding: 12px 15px; text-align: left; font-weight: 600; color: var(--primary); border-bottom: 1px solid var(--border); }
td { padding: 12px 15px; border-bottom: 1px solid var(--border); color: var(--text-soft); }
tr:hover { background: var(--surface-light); }
.actions a { margin-right: 10px; text-decoration: none; }
.actions .approve { color: var(--primary); }
.actions .delete { color: #ff6b6b; }
@media (max-width: 768px) { .admin-wrapper { flex-direction: column; } .sidebar { width: 100%; height: auto; position: static; } }
</style>
</head>
<body>
<div class="admin-wrapper">
<aside class="sidebar">
<div class="sidebar-header"><div class="logo">lv8girl</div><p>管理面板</p></div>
<ul class="sidebar-menu">
<li><a href="/admin">📊 仪表盘</a></li>
<li><a href="/admin/pending_posts">⏳ 待审核帖子</a></li>
<li><a href="/admin/pending_users" class="active">👥 待审核用户</a></li>
<li><a href="/admin/posts">📝 帖子管理</a></li>
<li><a href="/admin/users">👥 用户管理</a></li>
<li><a href="/admin/comments">💬 评论管理</a></li>
<li class="separator"></li>
<li><a href="/">🏠 返回首页</a></li>
</ul>
</aside>
<main class="main-content">
<div class="top-bar">
<h1 class="page-title">待审核用户</h1>
<div class="user-info"><span>{{.Username}}</span></div>
</div>
{{if .Message}}<div class="message">{{.Message}}</div>{{end}}
<div class="table-card">
<table>
<thead><tr><th>ID</th><th>用户名</th><th>邮箱</th><th>注册时间</th><th>操作</th></tr></thead>
<tbody>
{{range .Users}}
<tr>
<td>{{.ID}}</td>
<td>{{.Username}}</td>
<td>{{.Email}}</td>
<td>{{.CreatedAt.Format "2006-01-02 15:04"}}</td>
<td class="actions">
<a href="/admin/pending_users/approve/{{.ID}}" class="approve" onclick="return confirm('通过审核?')">通过</a>
<a href="/admin/pending_users/reject/{{.ID}}" class="delete" onclick="return confirm('拒绝审核?')">拒绝</a>
</td>
</tr>
{{end}}
</tbody>
</table>
</div>
</main>
</div>
</body>
</html>