feat: add video node preview

This commit is contained in:
stupid-h4er
2026-05-26 23:10:49 +08:00
parent c9fea71821
commit 1b2d473d9c
8 changed files with 137 additions and 24 deletions
+3 -1
View File
@@ -218,9 +218,11 @@ export default function ImagePage() {
const insertPickedAsset = async (payload: InsertAssetPayload) => {
if (payload.kind === "text") {
setPrompt(payload.content);
} else {
} else if (payload.kind === "image") {
const stored = await uploadImage(payload.dataUrl);
setReferences((value) => [...value, { id: nanoid(), name: payload.title, type: stored.mimeType, dataUrl: stored.url, storageKey: stored.storageKey }]);
} else {
message.warning("生图工作台只能使用文本或图片素材");
}
setAssetPickerOpen(false);
};