(optEl, kind)
| 1082 | </svg>`; |
| 1083 | } |
| 1084 | function setFolderIconForOption(optEl, kind) { |
| 1085 | const iconEl = optEl.querySelector('.folder-icon'); |
| 1086 | if (!iconEl) return; |
| 1087 | if (optEl.dataset && optEl.dataset.folder === 'recycle_bin') return; // keep recycle icon intact |
| 1088 | const isLocked = optEl.classList.contains('locked'); |
| 1089 | const isEncrypted = optEl.classList.contains('encrypted'); |
| 1090 | iconEl.dataset.kind = kind; |
| 1091 | iconEl.innerHTML = folderSVG(kind, { locked: isLocked, encrypted: isEncrypted }); |
| 1092 | } |
| 1093 | export function refreshFolderIcon(folder) { |
| 1094 | if (folder === 'recycle_bin') return; |
| 1095 | invalidateFolderCaches(folder); |
no test coverage detected