This commit is contained in:
toom1996
2026-09-22 21:40:04 +08:00
parent c32347ed3c
commit c3a6baa419
25 changed files with 2051 additions and 783 deletions

View File

@ -0,0 +1,30 @@
{{define "title"}}用户管理 · 管理后台{{end}}
{{define "barLabel"}}管理后台 · 用户管理{{end}}
{{define "barRight"}}<a href="/admin/logout">退出</a>{{end}}
{{define "content"}}
{{template "bar" .}}
<div class="main">
<h1>用户管理({{len .Users}})</h1>
<p class="muted">图片质量模型已统一:所有用户(含未登录)看图集详情均走同一高清样式,不再按等级分级。</p>
<table>
<thead><tr><th>ID</th><th>用户名</th><th>邮箱</th><th>等级</th><th>操作</th></tr></thead>
<tbody>
{{range .Users}}<tr>
<td><code>{{.ID}}</code></td>
<td>{{.Username}}</td>
<td class="muted">{{.Email}}</td>
<td>{{if eq .Tier "vip"}}<span class="badge vip">VIP</span>{{else}}<span class="badge free">FREE</span>{{end}}</td>
<td>
<form class="tier" method="post" action="/admin/users/{{.ID}}/tier">
<select name="tier">
<option value="free" {{if eq .Tier "free"}}selected{{end}}>free(普通)</option>
<option value="vip" {{if eq .Tier "vip"}}selected{{end}}>vip</option>
</select>
<button type="submit">保存</button>
</form>
</td>
</tr>{{end}}
</tbody>
</table>
</div>
{{end}}