- SecurityHeaders 中间件生成随机 nonce,注入 context - BuildPageData/BuildAdminPageData 将 CSPNonce 传递给模板 - 所有 19 个模板文件 <script> 标签添加 nonce 属性 - 移除所有内联事件处理(onclick/onerror),改用事件监听 - 移除所有 javascript:void(0) 链接,改用 # 号 + preventDefault - utils.js 添加全局 avatar 图片加载失败回退处理 - common.js 登出按钮添加 preventDefault - audit.js 关闭弹窗按钮改用事件监听
111 lines
4.4 KiB
HTML
111 lines
4.4 KiB
HTML
{{template "admin/layout/base.html" .}}
|
|
<div class="page-header">
|
|
<h1>审核管理</h1>
|
|
<p class="page-desc">审核用户提交的用户名、头像、个性签名修改</p>
|
|
</div>
|
|
|
|
<!-- 审核状态筛选 + TAB -->
|
|
<div class="filter-bar">
|
|
<div class="audit-tabs">
|
|
<button class="audit-tab active" data-tab="username">用户名</button>
|
|
<button class="audit-tab" data-tab="avatar">头像</button>
|
|
<button class="audit-tab" data-tab="bio">个性签名</button>
|
|
<button class="audit-tab" data-tab="history">审核记录</button>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 用户名审核(表格) -->
|
|
<div class="audit-panel active" id="panel-username">
|
|
<div class="table-container">
|
|
<table class="data-table">
|
|
<thead>
|
|
<tr>
|
|
<th>提交者</th>
|
|
<th>当前用户名</th>
|
|
<th>新用户名</th>
|
|
<th>提交时间</th>
|
|
<th>操作</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="usernameTableBody">
|
|
<tr class="table-loading"><td colspan="5">加载中...</td></tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="pagination-bar" id="usernamePagination"></div>
|
|
</div>
|
|
|
|
<!-- 头像审核(卡片网格) -->
|
|
<div class="audit-panel" id="panel-avatar">
|
|
<div class="avatar-audit-grid" id="avatarGrid">
|
|
<div class="table-loading-full">加载中...</div>
|
|
</div>
|
|
<div class="pagination-bar" id="avatarPagination"></div>
|
|
</div>
|
|
|
|
<!-- 签名审核(表格) -->
|
|
<div class="audit-panel" id="panel-bio">
|
|
<div class="table-container">
|
|
<table class="data-table">
|
|
<thead>
|
|
<tr>
|
|
<th>提交者</th>
|
|
<th>新签名</th>
|
|
<th>提交时间</th>
|
|
<th>操作</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="bioTableBody">
|
|
<tr class="table-loading"><td colspan="4">加载中...</td></tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="pagination-bar" id="bioPagination"></div>
|
|
</div>
|
|
|
|
<!-- 审核记录(全部状态) -->
|
|
<div class="audit-panel" id="panel-history">
|
|
<div class="table-container">
|
|
<table class="data-table">
|
|
<thead>
|
|
<tr>
|
|
<th>类型</th>
|
|
<th>提交者</th>
|
|
<th>内容</th>
|
|
<th>状态</th>
|
|
<th>审核人</th>
|
|
<th>提交时间</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="historyTableBody">
|
|
<tr class="table-loading"><td colspan="6">加载中...</td></tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="pagination-bar" id="historyPagination"></div>
|
|
</div>
|
|
|
|
<!-- 拒绝理由弹窗 -->
|
|
<div class="modal-overlay" id="rejectModal" style="display:none;">
|
|
<div class="modal-box">
|
|
<h3>拒绝审核</h3>
|
|
<p>请填写拒绝理由:</p>
|
|
<textarea id="rejectReason" rows="3" maxlength="500" placeholder="请输入拒绝理由..."></textarea>
|
|
<div class="modal-actions">
|
|
<button class="btn btn-outline" id="closeRejectModalBtn">取消</button>
|
|
<button class="btn btn-danger" id="confirmRejectBtn">确认拒绝</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script nonce="{{.CSPNonce}}">
|
|
window.__AUDIT_TYPES = {
|
|
{{range $val, $label := .AuditTypes}}"{{$val}}": "{{$label}}",
|
|
{{end}}
|
|
};
|
|
window.__AUDIT_STATUS = {
|
|
{{range $val, $label := .AuditStatus}}"{{$val}}": "{{$label}}",
|
|
{{end}}
|
|
};
|
|
</script>
|
|
{{template "admin/layout/footer.html" .}}
|