fix(admin): 添加管理操作错误处理及更新模板样式
- 管理后台帖子与用户审核操作中添加失败错误重定向处理 - 管理后台帖子、用户、评论删除操作中添加错误检查及提示 - 用户角色更新操作失败时添加错误重定向 - 用户封禁通知失败时添加相应错误提示 - 登录登出时session保存加入错误处理 - 讨论区上传目录创建失败时显示错误提示 - 移除admin_dashboard.html多余样式及修正侧边栏当前页高亮 - admin_posts.html和admin_users.html添加状态样式动态使用的隐藏span元素 - admin_users.html为角色选择添加label以提升无障碍性 - 升级项目依赖版本,包含gin、gorm、validator等核心库版本更新
This commit is contained in:
@@ -40,18 +40,6 @@
|
||||
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
|
||||
.stat-number { font-size: 2.5rem; font-weight: 700; color: var(--primary); line-height: 1.2; margin-bottom: 4px; }
|
||||
.stat-label { color: var(--text-hint); font-size: 0.95rem; }
|
||||
.table-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
|
||||
table { width: 100%; border-collapse: collapse; }
|
||||
th { background: var(--surface-light); padding: 12px 15px; text-align: left; font-weight: 600; color: var(--primary); border-bottom: 1px solid var(--border); }
|
||||
td { padding: 12px 15px; border-bottom: 1px solid var(--border); color: var(--text-soft); }
|
||||
tr:last-child td { border-bottom: none; }
|
||||
tr:hover { background: var(--surface-light); }
|
||||
.actions a { margin-right: 10px; color: var(--text-hint); text-decoration: none; }
|
||||
.actions a:hover { color: var(--primary); }
|
||||
.actions .delete { color: #ff6b6b; }
|
||||
.actions .delete:hover { color: #ff4d4d; }
|
||||
.actions .approve { color: var(--primary); }
|
||||
.actions .approve:hover { color: var(--primary-light); }
|
||||
.message { background: var(--surface-light); border-left: 4px solid var(--primary); padding: 12px 20px; margin-bottom: 20px; border-radius: 8px; color: var(--text); }
|
||||
@media (max-width: 768px) { .admin-wrapper { flex-direction: column; } .sidebar { width: 100%; height: auto; position: static; } }
|
||||
</style>
|
||||
@@ -64,7 +52,7 @@
|
||||
<p>管理面板</p>
|
||||
</div>
|
||||
<ul class="sidebar-menu">
|
||||
<li><a href="/admin" class="{{if eq .Page "dashboard"}}active{{end}}">📊 仪表盘</a></li>
|
||||
<li><a href="/admin" class="active">📊 仪表盘</a></li>
|
||||
<li><a href="/admin/pending_posts" class="{{if eq .Page "pending_posts"}}active{{end}}">⏳ 待审核帖子</a></li>
|
||||
<li><a href="/admin/pending_users" class="{{if eq .Page "pending_users"}}active{{end}}">👥 待审核用户</a></li>
|
||||
<li><a href="/admin/posts" class="{{if eq .Page "posts"}}active{{end}}">📝 帖子管理</a></li>
|
||||
|
||||
Reference in New Issue
Block a user