feat: 全站评论开关,并统一后台表单控件
关闭评论后前台隐藏评论能力;外观/设置/公告改用 AdminField 与 Stepper。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -16,6 +16,7 @@ export default function UserProfileContent({
|
||||
commentData,
|
||||
commentError,
|
||||
page,
|
||||
allowComments = true,
|
||||
}: {
|
||||
userId: string;
|
||||
profile: UserProfile;
|
||||
@@ -23,6 +24,7 @@ export default function UserProfileContent({
|
||||
commentData: UserCommentsResponse | null;
|
||||
commentError: boolean;
|
||||
page: number;
|
||||
allowComments?: boolean;
|
||||
}) {
|
||||
return (
|
||||
<div>
|
||||
@@ -50,9 +52,11 @@ export default function UserProfileContent({
|
||||
</h2>
|
||||
<div className="flex items-center gap-4 meta text-[12px]">
|
||||
<span className="tabular-nums">{new Date(post.created_at).toLocaleDateString("zh-CN")}</span>
|
||||
<span className="inline-flex items-center gap-1">
|
||||
<IconComment size={12} /> {post.comment_count}
|
||||
</span>
|
||||
{allowComments ? (
|
||||
<span className="inline-flex items-center gap-1">
|
||||
<IconComment size={12} /> {post.comment_count}
|
||||
</span>
|
||||
) : null}
|
||||
<span className="inline-flex items-center gap-1">
|
||||
<IconEye size={12} /> {post.view_count}
|
||||
</span>
|
||||
|
||||
Reference in New Issue
Block a user