refactor(empty-list): simplify empty list, will now work on list view
This commit is contained in:
@@ -237,15 +237,9 @@ async function loadFiles(options = { insertHistory: true}) {
|
||||
const fileList = Array.isArray(listing.files) ? listing.files : [];
|
||||
|
||||
if (folderList.length === 0 && fileList.length === 0) {
|
||||
const emptyState = document.createElement('div');
|
||||
emptyState.className = 'empty-state';
|
||||
emptyState.innerHTML = `
|
||||
<i class="fas fa-folder-open empty-state-icon"></i>
|
||||
<p>${_t('files.no_files')}</p>
|
||||
<p>${_t('files.empty_hint')}</p>
|
||||
`;
|
||||
elements.filesGrid.appendChild(emptyState);
|
||||
window.showEmptyList(true);
|
||||
} else {
|
||||
window.showEmptyList(false);
|
||||
window.ui.renderFolders(folderList);
|
||||
window.ui.renderFiles(fileList);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user