补齐问答采纳/重开、投票匿名与有票禁编、悬赏过期退回、抽奖回帖开奖,并接入积分账本与发帖附件可见性。 Co-authored-by: Cursor <cursoragent@cursor.com>
57 lines
1.3 KiB
TypeScript
57 lines
1.3 KiB
TypeScript
"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}`}
|
|
/>
|
|
);
|
|
}
|