fix(canvas): 画布与素材同步 - 修复批量缩略图、远程资源回退与重命名同步

This commit is contained in:
ddCat committed 2026-09-18 23:27:34 +08:00
1 parent 1a79005d25
commit 262540ea36
19 files changed
+635 -513

No files matched your search

@@ -309,7 +309,11 @@ export function useCanvasProjectLifecycle({
const renameCurrentProject = useCallback((title: string) => {
renameProject(projectId, title);
}, [projectId, renameProject]);
// 标题是画布列表和分享入口的元数据,重命名后立即提交,避免只停留在浏览器缓存。
void saveRemoteUserDataNow(projectId).catch((error) => {
message.warning(error instanceof Error ? `名称已更新到本地,云端同步将在后台重试:${error.message}` : "名称已更新到本地,云端同步将在后台重试");
});
}, [message, projectId, renameProject]);
const persistLocalEdits = useCallback(async () => {
const snapshot = { nodes: nodesRef.current, connections: connectionsRef.current, chatSessions, activeChatId, canvasAppearance, backgroundMode, showImageInfo };