feat: 类型帖互动、积分经济与发帖体验
补齐问答采纳/重开、投票匿名与有票禁编、悬赏过期退回、抽奖回帖开奖,并接入积分账本与发帖附件可见性。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
56
frontend/app/post/[id]/edit/EditPostClient.tsx
Normal file
56
frontend/app/post/[id]/edit/EditPostClient.tsx
Normal file
@@ -0,0 +1,56 @@
|
||||
"use client";
|
||||
|
||||
import PostComposer from "@/components/PostComposer";
|
||||
import type { PostAttachment } from "@/lib/api";
|
||||
|
||||
type Props = {
|
||||
postId: number;
|
||||
initialTitle: string;
|
||||
initialContent: string;
|
||||
initialTags: string;
|
||||
initialPostType?: string;
|
||||
initialContentAccess?: string;
|
||||
initialAccessPoints?: number;
|
||||
initialTypeMeta?: string;
|
||||
initialAttachments?: PostAttachment[];
|
||||
canEditPollOptions?: boolean;
|
||||
boardName: string;
|
||||
boardId: number;
|
||||
boardColorIndex?: number;
|
||||
};
|
||||
|
||||
export default function EditPostClient({
|
||||
postId,
|
||||
initialTitle,
|
||||
initialContent,
|
||||
initialTags,
|
||||
initialPostType,
|
||||
initialContentAccess,
|
||||
initialAccessPoints,
|
||||
initialTypeMeta,
|
||||
initialAttachments,
|
||||
canEditPollOptions,
|
||||
boardName,
|
||||
boardId,
|
||||
boardColorIndex = 0,
|
||||
}: Props) {
|
||||
return (
|
||||
<PostComposer
|
||||
mode="edit"
|
||||
postId={postId}
|
||||
initialTitle={initialTitle}
|
||||
initialContent={initialContent}
|
||||
initialTags={initialTags}
|
||||
initialPostType={initialPostType}
|
||||
initialContentAccess={initialContentAccess}
|
||||
initialAccessPoints={initialAccessPoints}
|
||||
initialTypeMeta={initialTypeMeta}
|
||||
initialAttachments={initialAttachments}
|
||||
canEditPollOptions={canEditPollOptions}
|
||||
boardName={boardName}
|
||||
boardId={boardId}
|
||||
boardColorIndex={boardColorIndex}
|
||||
cancelHref={`/post/${postId}`}
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user