feat: Admin 设用户等级并展示徽章于用户页

补齐 SetUserLevel 表单;用户主页/资料页展示徽章并触发 EvaluateAuto;勾选 §H Exp 与防刷。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-30 04:02:24 +08:00
parent 9e403a7178
commit 4ffcaecba2
13 changed files with 194 additions and 86 deletions

View File

@@ -86,6 +86,16 @@
<input name="note" maxlength="120" placeholder="备注(可选)" style="width:8rem"/>
<button type="submit" class="j13-btn-secondary">调积分</button>
</form>
<form method="post" action="/admin/users/{{.ID}}/level" class="j13-form j13-admin-level">
<input type="hidden" name="_csrf" value="{{$.CSRF}}"/>
{{$cur := .Level}}
<select name="level" aria-label="设定等级">
{{range $.LevelOptions}}
<option value="{{.}}"{{if eq . $cur}} selected{{end}}>Lv{{.}}</option>
{{end}}
</select>
<button type="submit" class="j13-btn-secondary">设等级</button>
</form>
</td>
</tr>
{{end}}