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

Function applyFolderStripLayout

public/js/fileListView.js:1327–1345  ·  view source on GitHub ↗
(strip)

Source from the content-addressed store, hash-verified

1325}
1326
1327function applyFolderStripLayout(strip) {
1328 if (!strip) return;
1329 const hasItems = strip.querySelector('.folder-item') !== null;
1330 if (!hasItems) {
1331 strip.style.display = 'none';
1332 strip.classList.remove('folder-strip-mobile', 'folder-strip-desktop');
1333 return;
1334 }
1335
1336 const isMobile = window.innerWidth <= 640; // tweak breakpoint if you want
1337
1338 strip.classList.add('folder-strip-container');
1339 strip.classList.toggle('folder-strip-mobile', isMobile);
1340 strip.classList.toggle('folder-strip-desktop', !isMobile);
1341
1342 strip.style.display = isMobile ? 'block' : 'flex';
1343 strip.style.overflowX = isMobile ? 'visible' : 'auto';
1344 strip.style.overflowY = isMobile ? 'auto' : 'hidden';
1345}
1346
1347window.addEventListener('resize', () => {
1348 const strip = document.getElementById('folderStripContainer');

Callers 2

drawPageFunction · 0.85
fileListView.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected