Files
backend_v2/internal/handler/templates/pages/users.html
toom1996 c3a6baa419 update
2026-09-22 21:40:04 +08:00

31 lines
1.1 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{{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}}