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

Function setFolderIconForOption

public/js/folderManager.js:1084–1092  ·  view source on GitHub ↗
(optEl, kind)

Source from the content-addressed store, hash-verified

1082</svg>`;
1083}
1084function 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}
1093export function refreshFolderIcon(folder) {
1094 if (folder === 'recycle_bin') return;
1095 invalidateFolderCaches(folder);

Callers 4

ensureFolderIconFunction · 0.85
primeChildTogglesFunction · 0.85
loadFolderTreeFunction · 0.85
folderManager.jsFile · 0.85

Calls 1

folderSVGFunction · 0.85

Tested by

no test coverage detected