diff --git a/common/modules/mixly-modules/common/file-tree.js b/common/modules/mixly-modules/common/file-tree.js index 75dbf680..4ea1ca68 100644 --- a/common/modules/mixly-modules/common/file-tree.js +++ b/common/modules/mixly-modules/common/file-tree.js @@ -637,12 +637,14 @@ class FileTree extends Component { const content = await this.readFolder(inPath); for (let item of content) { const { type, id, title, children } = item; - const text = path.basename(id); - let icon = 'icon-doc'; - if (type === 'folder') { - icon = this.#getFolderIcon_(text); - } else { - icon = this.#getFileIcon_(text); + const text = item.text ?? path.basename(id); + let icon = item.icon ?? 'icon-doc'; + if (!item.icon) { + if (type === 'folder') { + icon = this.#getFolderIcon_(text); + } else { + icon = this.#getFileIcon_(text); + } } output.push({ text,