优化模型上传与预览体验
This commit is contained in:
@@ -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]));
|
||||
|
||||
Reference in New Issue
Block a user