优化模型上传与预览体验

This commit is contained in:
zhangshun
2026-05-25 20:35:07 +08:00
parent a31c620420
commit efddf5adee
7 changed files with 878 additions and 79 deletions

View File

@@ -37,6 +37,9 @@ function buildFolderNodes(rows: FolderRow[], userInfo: { id: number; username: s
ownerUserId: row.owner_user_id,
isSystem: Boolean(row.is_system)
},
state: {
opened: row.library_type === "system" && row.parent_id === null
},
children: [] as unknown[]
}));
}
@@ -52,6 +55,9 @@ function buildTree(rows: FolderRow[], userInfo: { id: number; username: string;
permissions: { read: true, write: false },
virtual: true
},
state: {
opened: true
},
children: [] as unknown[]
};
const byId = new Map(nodes.map((node) => [Number(node.id), node]));