(folder)
| 470 | |
| 471 | // helper to repaint one strip item quickly |
| 472 | function repaintStripIcon(folder) { |
| 473 | const el = document.querySelector(`#folderStripContainer .folder-item[data-folder="${CSS.escape(folder)}"]`); |
| 474 | if (!el) return; |
| 475 | const iconSpan = el.querySelector('.folder-svg'); |
| 476 | if (!iconSpan) return; |
| 477 | |
| 478 | const hex = (window.folderColorMap && window.folderColorMap[folder]) || '#f6b84e'; |
| 479 | const front = hex; |
| 480 | const back = _lighten(hex, 14); |
| 481 | const stroke = _darken(hex, 22); |
| 482 | el.style.setProperty('--filr-folder-front', front); |
| 483 | el.style.setProperty('--filr-folder-back', back); |
| 484 | el.style.setProperty('--filr-folder-stroke', stroke); |
| 485 | |
| 486 | const kind = iconSpan.dataset.kind || 'empty'; |
| 487 | iconSpan.innerHTML = folderSVG(kind, { encrypted: isEncryptedForFolderIcon(folder) }); |
| 488 | } |
| 489 | const TEXT_PREVIEW_MAX_BYTES = 512 * 1024; |
| 490 | const DEFAULT_HOVER_PREVIEW_MAX_MB = 8; |
| 491 | const MIN_HOVER_PREVIEW_MAX_MB = 1; |
no test coverage detected