feat(ui): refine post interaction surfaces

This commit is contained in:
zetaloop
2026-04-25 21:41:01 +08:00
parent 29db9e5c0c
commit 1ee512940e
3 changed files with 51 additions and 29 deletions
+3 -2
View File
@@ -22,8 +22,9 @@ export function PostLikeButton({ postId, initialLiked, initialLikeCount }: PostL
return (
<button
type="button"
aria-label={liked ? "取消点赞帖子" : "点赞帖子"}
disabled={pending}
className="flex items-center gap-1 hover:text-foreground transition-colors disabled:opacity-60 disabled:pointer-events-none"
className="flex items-center gap-1 text-muted-foreground transition-colors hover:text-foreground disabled:pointer-events-none disabled:opacity-60"
onClick={() =>
requireAuth(() => {
if (pending) return
@@ -52,7 +53,7 @@ export function PostLikeButton({ postId, initialLiked, initialLikeCount }: PostL
})
}
>
<Heart className={`h-4 w-4 ${liked ? "fill-red-500 text-red-500" : ""}`} />
<Heart className={`h-4 w-4 ${liked ? "fill-destructive text-destructive" : ""}`} />
{likeCount}
</button>
)