feat: 代码片段功能与 Markdown 内嵌片段渲染、文档截图等

This commit is contained in:
2026-10-09 18:53:38 +08:00
parent 5598e1cbb7
commit da72843c70
64 changed files with 7047 additions and 248 deletions

View File

@@ -113,6 +113,18 @@ export default function MarkdownBodyClient({
if (seg.type === "video") {
return <MdVideo key={`video-${i}`} provider={seg.provider} id={seg.id} />;
}
if (seg.type === "snippet") {
// 客户端预览(发帖/评论草稿)无法 SSR 取数,渲染占位卡提示
return (
<div
key={`snippet-${i}`}
className="my-3 flex items-center gap-2 rounded-xl px-3 py-2.5 text-[13px]"
style={{ border: "1px dashed var(--line-2)", color: "var(--ink-3)" }}
>
代码片段 #{seg.id}(发布后可见)
</div>
);
}
const kind = seg.kind as HideKind;
if (seg.locked) {
return (