统一 React 管理后台,修复评论换行与帖子置顶
- /admin/* 全部由 React SPA 渲染,替代旧版 HTML 后台页面 - 新增仪表盘、帖子/评论/用户管理、系统设置与 JSON API - 帖子详情页支持管理员置顶;评论换行显示修复 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1659,7 +1659,6 @@ a.waline-comment-author:hover { color: var(--j13-green); }
|
||||
font-size: 14px;
|
||||
line-height: 1.65;
|
||||
word-break: break-word;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
.waline-comment-bubble .quote-block {
|
||||
margin: 6px 0;
|
||||
@@ -2369,3 +2368,76 @@ a.waline-comment-author:hover { color: var(--j13-green); }
|
||||
0%, 100% { opacity: 0.35; transform: scale(0.85); }
|
||||
50% { opacity: 1; transform: scale(1); }
|
||||
}
|
||||
|
||||
/* ========== React 管理后台 ========== */
|
||||
.admin-shell { min-height: 100vh; background: hsl(var(--background)); }
|
||||
.admin-topbar {
|
||||
display: flex; align-items: center; justify-content: space-between;
|
||||
height: 56px; padding: 0 20px; border-bottom: 1px solid var(--j13-border);
|
||||
background: hsl(var(--card));
|
||||
}
|
||||
.admin-topbar-brand { display: flex; align-items: center; gap: 10px; }
|
||||
.admin-topbar-mark {
|
||||
width: 32px; height: 32px; border-radius: 8px; background: var(--j13-green);
|
||||
color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700;
|
||||
}
|
||||
.admin-topbar-title { font-size: 14px; font-weight: 600; line-height: 1.2; }
|
||||
.admin-topbar-sub { font-size: 12px; color: hsl(var(--muted-foreground)); }
|
||||
.admin-topbar-actions { display: flex; align-items: center; gap: 12px; }
|
||||
.admin-topbar-user { font-size: 13px; color: hsl(var(--muted-foreground)); }
|
||||
.admin-link-btn {
|
||||
display: inline-flex; align-items: center; gap: 6px; font-size: 13px;
|
||||
color: var(--j13-green); background: none; border: none; cursor: pointer;
|
||||
}
|
||||
.admin-body { display: flex; min-height: calc(100vh - 56px); }
|
||||
.admin-sidebar {
|
||||
width: 200px; flex-shrink: 0; padding: 16px 10px; border-right: 1px solid var(--j13-border);
|
||||
background: hsl(var(--card));
|
||||
}
|
||||
.admin-nav-item {
|
||||
display: flex; align-items: center; gap: 8px; width: 100%;
|
||||
padding: 9px 12px; margin-bottom: 2px; border-radius: 8px; font-size: 13px;
|
||||
color: hsl(var(--muted-foreground)); text-decoration: none; transition: background .15s, color .15s;
|
||||
}
|
||||
.admin-nav-item:hover { background: var(--j13-green-bg); color: var(--j13-green); }
|
||||
.admin-nav-item.active { background: var(--j13-green-bg); color: var(--j13-green); font-weight: 600; }
|
||||
.admin-main { flex: 1; padding: 24px; overflow: auto; }
|
||||
.admin-page-head { margin-bottom: 20px; }
|
||||
.admin-page-head h1 { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
|
||||
.admin-page-head p { font-size: 13px; color: hsl(var(--muted-foreground)); }
|
||||
.admin-stat-grid {
|
||||
display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
|
||||
gap: 12px; margin-bottom: 20px;
|
||||
}
|
||||
.admin-stat-card {
|
||||
padding: 16px; border-radius: 10px; border: 1px solid var(--j13-border); background: hsl(var(--card));
|
||||
}
|
||||
.admin-stat-value { font-size: 24px; font-weight: 700; color: var(--j13-green); }
|
||||
.admin-stat-label { font-size: 12px; color: hsl(var(--muted-foreground)); margin-top: 4px; }
|
||||
.admin-card {
|
||||
border: 1px solid var(--j13-border); border-radius: 10px; background: hsl(var(--card));
|
||||
overflow: hidden; margin-bottom: 16px;
|
||||
}
|
||||
.admin-card-head {
|
||||
display: flex; align-items: center; justify-content: space-between;
|
||||
padding: 12px 16px; border-bottom: 1px solid var(--j13-border); font-weight: 600; font-size: 14px;
|
||||
}
|
||||
.admin-card-desc { padding: 12px 16px 0; font-size: 13px; color: hsl(var(--muted-foreground)); }
|
||||
.admin-card .admin-card-desc + button { margin: 12px 16px 16px; }
|
||||
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
|
||||
.admin-table th, .admin-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--j13-border); }
|
||||
.admin-table th { font-weight: 600; color: hsl(var(--muted-foreground)); background: hsl(var(--muted) / 0.3); }
|
||||
.admin-table tr:last-child td { border-bottom: none; }
|
||||
.admin-empty { padding: 32px; text-align: center; color: hsl(var(--muted-foreground)); font-size: 13px; }
|
||||
.admin-text-link {
|
||||
background: none; border: none; padding: 0; color: var(--j13-green); cursor: pointer; font-size: inherit;
|
||||
}
|
||||
.admin-text-link:hover { text-decoration: underline; }
|
||||
.admin-search-bar { display: flex; gap: 8px; margin-bottom: 16px; max-width: 480px; }
|
||||
.admin-pagination {
|
||||
display: flex; align-items: center; justify-content: center; gap: 12px;
|
||||
padding: 12px; border-top: 1px solid var(--j13-border); font-size: 13px;
|
||||
}
|
||||
.admin-dl { padding: 16px; display: grid; grid-template-columns: 120px 1fr; gap: 10px 16px; font-size: 13px; }
|
||||
.admin-dl dt { color: hsl(var(--muted-foreground)); }
|
||||
.admin-dl dd code { font-size: 12px; background: hsl(var(--muted)); padding: 2px 6px; border-radius: 4px; }
|
||||
|
||||
Reference in New Issue
Block a user