(strip)
| 1325 | } |
| 1326 | |
| 1327 | function 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 | |
| 1347 | window.addEventListener('resize', () => { |
| 1348 | const strip = document.getElementById('folderStripContainer'); |
no outgoing calls
no test coverage detected