MCPcopy Create free account
hub / github.com/error311/FileRise / renderAll

Function renderAll

public/js/sharedFolderView.js:875–891  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

873 }
874
875 function renderAll() {
876 const filtered = applyFilter();
877 const hasItems = filtered.length > 0;
878
879 if (emptyEl) emptyEl.style.display = hasItems ? 'none' : '';
880 if (listEl) listEl.style.display = viewMode === 'list' && hasItems ? '' : (viewMode === 'list' ? '' : 'none');
881 if (galleryEl) galleryEl.style.display = viewMode === 'gallery' && hasItems ? '' : (viewMode === 'gallery' ? '' : 'none');
882
883 if (hasItems) {
884 renderList(filtered);
885 renderGallery(filtered);
886 } else {
887 if (listEl) listEl.textContent = '';
888 if (galleryEl) galleryEl.textContent = '';
889 }
890 updateCounts(filtered.length);
891 }
892
893 let viewMode = 'list';
894 if (toggleBtn) {

Callers 1

Calls 4

renderGalleryFunction · 0.85
updateCountsFunction · 0.85
applyFilterFunction · 0.70
renderListFunction · 0.70

Tested by

no test coverage detected