Files
mce/templates/admin/html/dashboard/index.html
Victor_Jay 543325105c fix: 修复管理后台样式丢失 + CSP inline style 违规
- 评论管理页:创建 comments.css,controller 传递 ExtraCSS/ExtraJS,模板移除所有 inline style,JS 改用 CSS 类
- 修复 comments.js 加载顺序:通过 ExtraJS 在 common.js 之后加载,解决 api is not defined
- base.html:SVG inline style 移至 common.css
- dashboard/index.html:3 处 inline style 替换为 CSS 类
- audit/index.html:modal 移除冗余 style="display:none"
- fund_logs/logs:label inline style 移至 energy.css
- common.css 新增多个 CSS 规则
- energy.css 新增 .filter-bar label 规则
2026-06-02 21:37:52 +08:00

52 lines
3.1 KiB
HTML

{{template "admin/layout/base.html" .}}
<div class="page-header">
<h1>欢迎,{{.Username}}</h1>
<p class="page-desc">MetaLab 管理控制面板</p>
</div>
<div class="stats-grid">
<div class="stat-card">
<div class="stat-icon stat-blue"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="8" r="4"/><path d="M4 20c0-4 4-7 8-7s8 3 8 7"/></svg></div>
<div class="stat-info"><div class="stat-label">用户总数</div><div class="stat-value">{{.TotalUsers}}</div></div>
</div>
<div class="stat-card">
<div class="stat-icon stat-green"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><rect x="3" y="3" width="18" height="18"/><line x1="9" y1="9" x2="15" y2="9"/><line x1="9" y1="13" x2="15" y2="13"/></svg></div>
<div class="stat-info">
<div class="stat-label">帖子总数</div>
<div class="stat-value">{{.PostTotal}}</div>
<div class="stat-desc">已发布 {{.PostApproved}}<span class="stat-badge badge-warn">待审核 {{.PostPending}}</span></div>
</div>
</div>
<div class="stat-card">
<div class="stat-icon stat-orange"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/></svg></div>
<div class="stat-info"><div class="stat-label">当前角色</div><div class="stat-value">{{.RoleDisplayName}}</div></div>
</div>
</div>
<div class="stats-grid mt-grid">
<div class="stat-card span-2">
<div class="stat-icon {{if .StoreDegraded}}stat-red{{else if eq .StoreType "redis"}}stat-green{{else}}stat-blue{{end}}">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><ellipse cx="12" cy="5" rx="9" ry="3"/><path d="M21 12c0 1.66-4 3-9 3s-9-1.34-9-3"/><path d="M3 5v14c0 1.66 4 3 9 3s9-1.34 9-3V5"/></svg>
</div>
<div class="stat-info">
<div class="stat-label">会话存储后端</div>
<div class="stat-value">
{{if eq .StoreType "redis"}}Redis{{else}}内存{{end}}
{{if .StoreDegraded}}<span class="stat-badge badge-warn">已降级</span>{{end}}
</div>
{{if .DegradedNote}}<div class="stat-desc">{{.DegradedNote}}</div>{{end}}
{{if ge .ActiveSessions 0}}<div class="stat-desc">活跃会话数:{{.ActiveSessions}}</div>{{end}}
</div>
</div>
</div>
<div class="info-card">
<h3>快速开始</h3>
<ul>
<li>在左侧导航选择管理模块</li>
<li>使用「用户管理」查看、搜索和封禁用户</li>
<li>使用「返回前台」链接回到主站</li>
</ul>
</div>
{{template "admin/layout/footer.html" .}}