统一投票/悬赏/抽奖截止与状态展示,抽奖支持多奖品行;发帖页悬赏积分对齐表格输入,并在余额不足时于底部就地提示。 Co-authored-by: Cursor <cursoragent@cursor.com>
60 lines
1.4 KiB
TypeScript
60 lines
1.4 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;
|
|
canEditLotteryPrizes?: boolean;
|
|
boardName: string;
|
|
boardId: number;
|
|
boardColorIndex?: number;
|
|
};
|
|
|
|
export default function EditPostClient({
|
|
postId,
|
|
initialTitle,
|
|
initialContent,
|
|
initialTags,
|
|
initialPostType,
|
|
initialContentAccess,
|
|
initialAccessPoints,
|
|
initialTypeMeta,
|
|
initialAttachments,
|
|
canEditPollOptions,
|
|
canEditLotteryPrizes,
|
|
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}
|
|
canEditLotteryPrizes={canEditLotteryPrizes}
|
|
boardName={boardName}
|
|
boardId={boardId}
|
|
boardColorIndex={boardColorIndex}
|
|
cancelHref={`/post/${postId}`}
|
|
/>
|
|
);
|
|
}
|