(optEl, locked)
| 78 | } |
| 79 | |
| 80 | function markOptionLocked(optEl, locked) { |
| 81 | if (!optEl) return; |
| 82 | optEl.classList.toggle('locked', !!locked); |
| 83 | |
| 84 | // Disable DnD when locked |
| 85 | if (locked) optEl.removeAttribute('draggable'); |
| 86 | |
| 87 | // Refresh the icon with padlock overlay |
| 88 | const iconEl = optEl.querySelector('.folder-icon'); |
| 89 | if (iconEl) { |
| 90 | const currentKind = iconEl?.dataset?.kind || 'empty'; |
| 91 | iconEl.innerHTML = folderSVG(currentKind, { locked: !!locked, encrypted: optEl.classList.contains('encrypted') }); |
| 92 | } |
| 93 | } |
| 94 | |
| 95 | /* ---------------------- |
| 96 | Simple format + parent helpers (exported for other modules) |
no test coverage detected