feat: 收藏夹系统 + Studio 趋势图 + 通知偏好设置

- 新增收藏夹系统 (Folder/FolderItem 模型、CRUD API、前端管理页)
- 新增文章详情页收藏按钮 (书签图标、ToggleFavorite 一键收藏)
- 新增 Studio 趋势图 (赋能值/评论/点赞/收藏 4 线图, 7d/30d/90d)
- 新增通知偏好设置页 (评论/回复/点赞/关注 4 类开关)
- 后端通知列表支持按偏好过滤 (排除已关闭的通知类型)
- 下载 Chart.js 到本地静态资源 (static/js/chart.umd.min.js)
- 补充收藏夹卡片、开关滑块、趋势图网格等 CSS 样式
This commit is contained in:
2026-06-01 17:33:59 +08:00
parent 680df7371a
commit 4d212a8f8a
27 changed files with 2005 additions and 33 deletions

View File

@ -621,6 +621,90 @@
padding: 8px 24px;
}
/* ---------- 趋势图 ---------- */
.trends-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16px;
}
.trends-period {
display: flex;
gap: 4px;
background: #f3f4f6;
border-radius: 8px;
padding: 3px;
}
.trends-period-btn {
padding: 6px 14px;
border: none;
background: transparent;
font-size: 13px;
font-weight: 500;
color: #6b7280;
border-radius: 6px;
cursor: pointer;
font-family: inherit;
transition: all .15s ease;
}
.trends-period-btn.active {
background: #fff;
color: #111827;
font-weight: 600;
box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.trends-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 16px;
}
.trends-card {
background: var(--color-surface);
border-radius: var(--radius);
box-shadow: var(--shadow);
border: 1px solid var(--color-border);
padding: 20px;
}
.trends-card-title {
font-size: 14px;
font-weight: 600;
color: var(--color-text);
margin: 0 0 12px 0;
}
.trends-chart-wrap {
position: relative;
width: 100%;
height: 220px;
}
.trends-chart-wrap canvas {
display: block;
}
.trends-loading {
display: none;
text-align: center;
padding: 60px 0;
color: #9ca3af;
font-size: 13px;
}
.trends-no-data {
display: flex;
align-items: center;
justify-content: center;
height: 220px;
color: #9ca3af;
font-size: 14px;
}
/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
.studio-wrapper {