refactor: 重构 Space 页面为统一多 Tab 布局 + 移除独立关注/粉丝子页面
- 后端:SpaceController 支持 5 个 Tab(文章/关注/粉丝/收藏/设置),统一处理本人与访客视图 - 后端:注入 FavoriteService 支持收藏夹 Tab,新增用户统计数据查询 - 后端:新增 PUT /api/space/privacy 隐私设置 API 端点 - 后端:移除 FollowPageController 及 /space/:uid/followers|following 路由 - 前端:完全重写 space/index.html,顶部信息栏 + Tab 导航 + 左侧栏 + 主内容区 - 前端:重写 space.css 适配新布局(Profile Header/Tab Bar/文章/收藏/设置) - 清理:删除独立的 follow HTML 模板和 CSS 文件 - 模型:User 表新增 follower_list_public 隐私字段
This commit is contained in:
@ -20,9 +20,10 @@ type User struct {
|
||||
Energy int `gorm:"default:0" json:"energy"` // 域能余额(可为负数,乘10存储)
|
||||
|
||||
// 关注系统
|
||||
FollowersCount int `gorm:"default:0" json:"followers_count"` // 粉丝数(冗余计数器)
|
||||
FollowingCount int `gorm:"default:0" json:"following_count"` // 关注数(冗余计数器)
|
||||
FollowListPublic bool `gorm:"default:true" json:"follow_list_public"` // 关注/粉丝列表是否公开
|
||||
FollowersCount int `gorm:"default:0" json:"followers_count"` // 粉丝数(冗余计数器)
|
||||
FollowingCount int `gorm:"default:0" json:"following_count"` // 关注数(冗余计数器)
|
||||
FollowListPublic bool `gorm:"default:true" json:"follow_list_public"` // 关注/粉丝列表是否公开
|
||||
FollowerListPublic bool `gorm:"default:true" json:"follower_list_public"` // 粉丝列表是否公开
|
||||
|
||||
// 通知偏好 (JSON string)
|
||||
NotifyPrefs string `gorm:"type:text;default:'{\"comment\":true,\"comment_reply\":true,\"like_aggregated\":true,\"follow\":true}'" json:"-"`
|
||||
|
||||
Reference in New Issue
Block a user