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:
@ -877,3 +877,139 @@ body {
|
||||
.energy-log-minus .energy-log-amount {
|
||||
color: #e74c3c;
|
||||
}
|
||||
|
||||
/* ---------- 收藏夹 Tab ---------- */
|
||||
.fav-toolbar {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.fav-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0;
|
||||
}
|
||||
|
||||
.fav-folder-card {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 1rem 0;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
}
|
||||
|
||||
.fav-folder-card:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.fav-folder-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: .25rem;
|
||||
}
|
||||
|
||||
.fav-folder-name {
|
||||
font-size: .95rem;
|
||||
font-weight: 600;
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
.fav-folder-meta {
|
||||
font-size: .8rem;
|
||||
color: var(--color-text-light);
|
||||
}
|
||||
|
||||
.fav-folder-actions {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.fav-folder-del {
|
||||
padding: .35rem .75rem;
|
||||
font-size: .78rem;
|
||||
font-weight: 500;
|
||||
font-family: inherit;
|
||||
color: #e74c3c;
|
||||
background: #fff5f5;
|
||||
border: 1px solid #fecaca;
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
transition: all .15s ease;
|
||||
}
|
||||
|
||||
.fav-folder-del:hover {
|
||||
background: #fee2e2;
|
||||
border-color: #e74c3c;
|
||||
}
|
||||
|
||||
/* ---------- 通知偏好 Tab ---------- */
|
||||
.notify-pref-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 1rem 0;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
}
|
||||
|
||||
.notify-pref-row:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.notify-pref-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: .2rem;
|
||||
}
|
||||
|
||||
.notify-pref-label {
|
||||
font-size: .92rem;
|
||||
font-weight: 600;
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
.notify-pref-desc {
|
||||
font-size: .8rem;
|
||||
color: var(--color-text-light);
|
||||
}
|
||||
|
||||
.notify-pref-toggle {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
width: 44px;
|
||||
height: 24px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.notify-pref-toggle input {
|
||||
opacity: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
.notify-pref-slider {
|
||||
position: absolute;
|
||||
cursor: pointer;
|
||||
inset: 0;
|
||||
background: #d1d5db;
|
||||
border-radius: 24px;
|
||||
transition: background .2s ease;
|
||||
}
|
||||
|
||||
.notify-pref-slider::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
height: 18px;
|
||||
width: 18px;
|
||||
left: 3px;
|
||||
bottom: 3px;
|
||||
background: #fff;
|
||||
border-radius: 50%;
|
||||
transition: transform .2s ease;
|
||||
box-shadow: 0 1px 3px rgba(0,0,0,.15);
|
||||
}
|
||||
|
||||
.notify-pref-toggle input:checked + .notify-pref-slider {
|
||||
background: var(--color-accent);
|
||||
}
|
||||
|
||||
.notify-pref-toggle input:checked + .notify-pref-slider::before {
|
||||
transform: translateX(20px);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user