feat: 实现关注系统 + 通知侧边栏分类 TAB + 点赞聚合通知
- 新增关注系统:UserFollow 模型、FollowService(toggle/status/列表隐私控制) - User 新增 FollowersCount/FollowingCount/FollowListPublic/NotifyPrefs 字段 - Space 页面增加四态关注按钮(关注/已关注/回关/已互粉)+ 粉丝/关注数链接 - 新增 /space/:uid/followers 和 /space/:uid/following 列表页 - 新增 NotifyFollow/NotifyLikeAggregated 通知类型 - ReactionService 点赞时写入 daily_like_summary,访问时生成聚合通知 - FollowService 关注时触发 NotifyFollow 通知 - 消息中心侧边栏升级为分类 TAB(全部/系统通知/@艾特/点赞/关注) - NotificationService 新增 ListByCategory 按分类分页查询
This commit is contained in:
47
templates/MetaLab-2026/html/follow/followers.html
Normal file
47
templates/MetaLab-2026/html/follow/followers.html
Normal file
@ -0,0 +1,47 @@
|
||||
{{template "layout/header.html" .}}
|
||||
<meta name="robots" content="noindex,nofollow">
|
||||
<body>
|
||||
|
||||
{{template "layout/nav.html" .}}
|
||||
|
||||
<div class="follow-list-page">
|
||||
<h1>粉丝列表</h1>
|
||||
|
||||
{{if not .Result.Accessible}}
|
||||
<div class="follow-list-private">
|
||||
<p>该用户设置了关注列表不公开</p>
|
||||
</div>
|
||||
{{else if eq (len .Result.Items) 0}}
|
||||
<div class="follow-list-empty">
|
||||
<p>暂无粉丝</p>
|
||||
</div>
|
||||
{{else}}
|
||||
{{range .Result.Items}}
|
||||
<div class="follow-list-item">
|
||||
<a href="/space/{{.FollowerID}}" class="follow-list-user">
|
||||
<div class="follow-list-avatar">
|
||||
{{slice .FollowerUsername 0 1}}
|
||||
</div>
|
||||
<span class="follow-list-name">{{.FollowerUsername}}</span>
|
||||
</a>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
{{if gt .TotalPages 1}}
|
||||
<div class="pagination">
|
||||
{{if .HasPrev}}
|
||||
<a href="?page={{.PrevPage}}" class="page-link">上一页</a>
|
||||
{{end}}
|
||||
<span class="page-info">第 {{.Page}} / {{.TotalPages}} 页</span>
|
||||
{{if .HasNext}}
|
||||
<a href="?page={{.NextPage}}" class="page-link">下一页</a>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
{{template "layout/footer.html" .}}
|
||||
<script src="/static/js/common.js?v={{assetV "/static/js/common.js"}}"></script>
|
||||
</body>
|
||||
</html>
|
||||
47
templates/MetaLab-2026/html/follow/following.html
Normal file
47
templates/MetaLab-2026/html/follow/following.html
Normal file
@ -0,0 +1,47 @@
|
||||
{{template "layout/header.html" .}}
|
||||
<meta name="robots" content="noindex,nofollow">
|
||||
<body>
|
||||
|
||||
{{template "layout/nav.html" .}}
|
||||
|
||||
<div class="follow-list-page">
|
||||
<h1>关注列表</h1>
|
||||
|
||||
{{if not .Result.Accessible}}
|
||||
<div class="follow-list-private">
|
||||
<p>该用户设置了关注列表不公开</p>
|
||||
</div>
|
||||
{{else if eq (len .Result.Items) 0}}
|
||||
<div class="follow-list-empty">
|
||||
<p>暂未关注任何人</p>
|
||||
</div>
|
||||
{{else}}
|
||||
{{range .Result.Items}}
|
||||
<div class="follow-list-item">
|
||||
<a href="/space/{{.FolloweeID}}" class="follow-list-user">
|
||||
<div class="follow-list-avatar">
|
||||
{{slice .FolloweeUsername 0 1}}
|
||||
</div>
|
||||
<span class="follow-list-name">{{.FolloweeUsername}}</span>
|
||||
</a>
|
||||
</div>
|
||||
{{end}}
|
||||
|
||||
{{if gt .TotalPages 1}}
|
||||
<div class="pagination">
|
||||
{{if .HasPrev}}
|
||||
<a href="?page={{.PrevPage}}" class="page-link">上一页</a>
|
||||
{{end}}
|
||||
<span class="page-info">第 {{.Page}} / {{.TotalPages}} 页</span>
|
||||
{{if .HasNext}}
|
||||
<a href="?page={{.NextPage}}" class="page-link">下一页</a>
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
{{end}}
|
||||
</div>
|
||||
|
||||
{{template "layout/footer.html" .}}
|
||||
<script src="/static/js/common.js?v={{assetV "/static/js/common.js"}}"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user