correctd few bugs

This commit is contained in:
dcore94 2023-10-27 16:24:11 +02:00
parent 02501f8d84
commit 5ec5a0c4c2
1 changed files with 3 additions and 3 deletions

View File

@ -417,10 +417,10 @@ class D4SStorageTree extends D4SStorageHtmlElement {
data data
.filter(item => this.showFiles || item['@class'].includes('FolderItem')) .filter(item => this.showFiles || item['@class'].includes('FolderItem'))
.forEach(item => { .forEach(item => {
ul.appendChild(this.createListItem(item.name, item.id, item['@class'], parentId)); ul.appendChild(this.createListItem(item.title, item.id, item['@class'], parentId));
}) })
} else { } else {
ul.appendChild(this.createListItem(data.displayName ? data.displayName : data.name, data.id, data['@class'], parentId)); ul.appendChild(this.createListItem(data.displayName ? data.displayName : data.title, data.id, data['@class'], parentId));
} }
parentElement.appendChild(ul); parentElement.appendChild(ul);
} }
@ -434,7 +434,7 @@ class D4SStorageTree extends D4SStorageHtmlElement {
if (parentId) { if (parentId) {
li.setAttribute(D4SStorageTree.parentid_attr, parentId); li.setAttribute(D4SStorageTree.parentid_attr, parentId);
} }
const icon = type.includes('FolderItem') ? "folder.svg" : "file-earmark.svg" const icon = type.includes('FolderItem') || type.includes("SharedFolder")? "folder.svg" : "file-earmark.svg"
li.innerHTML = ` li.innerHTML = `
<img class="px-1" src="${this.srcBaseURL}/img/${icon}"</img> <img class="px-1" src="${this.srcBaseURL}/img/${icon}"</img>
<span>${label}</span> <span>${label}</span>