- 新增管理端板块管理页面与后端接口(admin_board) - 新增旧版数据导入:legacyimport 服务、导入面板、importusers 命令行工具 - 聊天用户卡片、板块图标等 UI 组件与界面优化 - 补充 about/公告/1Panel 部署等文档 - gitignore 排除 dist/ 构建产物与 .agents/ 本地工具目录
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;
|
|
initialTypeMeta?: string;
|
|
initialAttachments?: PostAttachment[];
|
|
canEditPollOptions?: boolean;
|
|
canEditLotteryPrizes?: boolean;
|
|
boardName: string;
|
|
boardId: number;
|
|
boardColorIndex?: number;
|
|
boardIcon?: string;
|
|
};
|
|
|
|
export default function EditPostClient({
|
|
postId,
|
|
initialTitle,
|
|
initialContent,
|
|
initialTags,
|
|
initialPostType,
|
|
initialTypeMeta,
|
|
initialAttachments,
|
|
canEditPollOptions,
|
|
canEditLotteryPrizes,
|
|
boardName,
|
|
boardId,
|
|
boardColorIndex = 0,
|
|
boardIcon,
|
|
}: Props) {
|
|
return (
|
|
<PostComposer
|
|
mode="edit"
|
|
postId={postId}
|
|
initialTitle={initialTitle}
|
|
initialContent={initialContent}
|
|
initialTags={initialTags}
|
|
initialPostType={initialPostType}
|
|
initialTypeMeta={initialTypeMeta}
|
|
initialAttachments={initialAttachments}
|
|
canEditPollOptions={canEditPollOptions}
|
|
canEditLotteryPrizes={canEditLotteryPrizes}
|
|
boardName={boardName}
|
|
boardId={boardId}
|
|
boardColorIndex={boardColorIndex}
|
|
boardIcon={boardIcon}
|
|
cancelHref={`/post/${postId}`}
|
|
/>
|
|
);
|
|
}
|