全项目扫描修复: Docker数据卷修复+安全requireAdmin+12页SEO+API白名单+脚本超时+常量提取+假数据删除
This commit is contained in:
@@ -109,22 +109,22 @@ export default function CommentCard({ comment, targetType, targetSlug, onReply,
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
<span className="text-[10px] text-muted-foreground/40">{getTimeAgo(new Date(comment.createdAt))}</span>
|
||||
<span className="text-[10px] text-muted-foreground/60">{getTimeAgo(new Date(comment.createdAt))}</span>
|
||||
</div>
|
||||
|
||||
<p className="mt-2 text-sm leading-relaxed text-muted-foreground/80 whitespace-pre-wrap">{comment.content}</p>
|
||||
<p className="mt-2 text-sm leading-relaxed text-foreground/85 whitespace-pre-wrap">{comment.content}</p>
|
||||
|
||||
<div className="mt-3 flex items-center gap-4">
|
||||
<button
|
||||
onClick={handleLike}
|
||||
className={`flex items-center gap-1 text-xs transition-colors ${comment.liked ? "text-primary" : "text-muted-foreground/50 hover:text-foreground"}`}
|
||||
className={`flex items-center gap-1 text-xs transition-colors ${comment.liked ? "text-primary" : "text-muted-foreground/70 hover:text-foreground"}`}
|
||||
>
|
||||
<ThumbsUp className={`w-3.5 h-3.5 transition-transform ${likeAnimating ? "scale-125" : ""}`} />
|
||||
<span>{comment.likeCount || "点赞"}</span>
|
||||
</button>
|
||||
<button
|
||||
onClick={() => onReply(comment.id, comment.user.name)}
|
||||
className="flex items-center gap-1 text-xs text-muted-foreground/50 hover:text-foreground transition-colors"
|
||||
className="flex items-center gap-1 text-xs text-muted-foreground/70 hover:text-foreground transition-colors"
|
||||
>
|
||||
<MessageSquare className="w-3.5 h-3.5" />
|
||||
<span>回复</span>
|
||||
@@ -135,7 +135,7 @@ export default function CommentCard({ comment, targetType, targetSlug, onReply,
|
||||
<div className="mt-3 space-y-2">
|
||||
<button
|
||||
onClick={() => setShowReplies(!showReplies)}
|
||||
className="flex items-center gap-1 text-xs text-muted-foreground/50 hover:text-foreground transition-colors"
|
||||
className="flex items-center gap-1 text-xs text-muted-foreground/70 hover:text-foreground transition-colors"
|
||||
>
|
||||
{showReplies ? <ChevronUp className="w-3 h-3" /> : <ChevronDown className="w-3 h-3" />}
|
||||
<span>{comment.replyCount > (comment.replies?.length || 0) ? `共${comment.replyCount}条回复,已加载${comment.replies?.length}条` : `共${comment.replies.length}条回复`}</span>
|
||||
@@ -153,9 +153,9 @@ export default function CommentCard({ comment, targetType, targetSlug, onReply,
|
||||
<div className="min-w-0 flex-1">
|
||||
<div className="flex items-center gap-1.5">
|
||||
<span className="text-xs font-medium">{reply.user.name}</span>
|
||||
<span className="text-[10px] text-muted-foreground/40">{getTimeAgo(new Date(reply.createdAt))}</span>
|
||||
<span className="text-[10px] text-muted-foreground/60">{getTimeAgo(new Date(reply.createdAt))}</span>
|
||||
</div>
|
||||
<p className="mt-0.5 text-xs text-muted-foreground/70 whitespace-pre-wrap">{reply.content}</p>
|
||||
<p className="mt-0.5 text-xs text-foreground/80 whitespace-pre-wrap">{reply.content}</p>
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
|
||||
Reference in New Issue
Block a user