feat: 浏览量统计、浏览记录追踪、UI色彩优化
- 新增 Post.viewCount 字段,文章详情/列表/精选卡片显示浏览量 - 新增 PageView 模型记录访客IP(脱敏)、设备类型、来源 - 后台新增浏览记录独立页面及侧边栏菜单 - 仪表盘新增访问概览:页面访问/今日/独立IP/设备分布 - 整体色彩体系优化:降低黑白对比度、统一暖色调 - UI细节修复:focus-visible、Footer空列、mobile hover、transition-all等10+项
This commit is contained in:
@@ -18,6 +18,7 @@ model Post {
|
||||
tags String // JSON 序列化的 string[]
|
||||
coverImage String?
|
||||
readingTime Int @default(5)
|
||||
viewCount Int @default(0)
|
||||
featured Boolean @default(false)
|
||||
status String @default("draft")
|
||||
createdAt String
|
||||
@@ -34,3 +35,14 @@ model Tag {
|
||||
id String @id
|
||||
name String @unique
|
||||
}
|
||||
|
||||
model PageView {
|
||||
id String @id
|
||||
path String
|
||||
postSlug String?
|
||||
ip String
|
||||
userAgent String
|
||||
device String @default("unknown")
|
||||
referrer String?
|
||||
createdAt String
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user