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

Function markOptionLocked

public/js/folderManager.js:80–93  ·  view source on GitHub ↗
(optEl, locked)

Source from the content-addressed store, hash-verified

78}
79
80function 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)

Callers 1

loadFolderTreeFunction · 0.85

Calls 1

folderSVGFunction · 0.85

Tested by

no test coverage detected