feat: 帖子收藏与用户关注

- 新增收藏功能:favorite 服务与 handler、FavoriteButton 组件
- 新增关注功能:follow 服务与 handler、FollowButton 组件
- 用户主页适配关注/粉丝与收藏展示
- flash 消息工具、广告与侧边栏组件微调
This commit is contained in:
2026-09-26 03:02:40 +08:00
parent 31f5360c26
commit d7c6b3a961
40 changed files with 1528 additions and 268 deletions

View File

@@ -6,7 +6,6 @@ import { getPublicSettingsCached } from "@/lib/serverData";
import { normalizePostType, postTypeLabel, typeStatusLabel, typeStatusClass } from "@/lib/postMeta";
import LikeButton from "./LikeButton";
import Avatar from "./Avatar";
import BadgeChip from "./BadgeChip";
import { IconComment, IconEye } from "./Icons";
/**
@@ -104,9 +103,6 @@ export default async function PostRow({
>
{authorName}
</Link>
{(post.user.badges ?? []).slice(0, 2).map((ub) => (
<BadgeChip key={ub.id} badge={ub.badge} />
))}
<span aria-hidden>·</span>
<span className="tabular-nums">{formatRelative(post.created_at)}</span>
{replied && (