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

Function setEncryptedClassForRenderedSubtree

public/js/folderManager.js:3045–3059  ·  view source on GitHub ↗
(folder, encrypted)

Source from the content-addressed store, hash-verified

3043}
3044
3045function setEncryptedClassForRenderedSubtree(folder, encrypted) {
3046 try {
3047 const esc = CSS.escape(folder);
3048 const sel = `.folder-option[data-folder="${esc}"], .folder-option[data-folder^="${esc}/"]`;
3049 document.querySelectorAll(sel).forEach(opt => {
3050 opt.classList.toggle('encrypted', !!encrypted);
3051 const iconEl = opt.querySelector('.folder-icon');
3052 if (iconEl) {
3053 const kind = iconEl?.dataset?.kind || 'empty';
3054 // nosemgrep: javascript.browser.security.dom-xss.innerhtml
3055 iconEl.innerHTML = folderSVG(kind, { locked: opt.classList.contains('locked'), encrypted: opt.classList.contains('encrypted') });
3056 }
3057 });
3058 } catch (e) { }
3059}
3060
3061function ensureCryptoJobUi() {
3062 if (__cryptoUiReady) return;

Callers 2

finalizeCryptoJobUiFunction · 0.85
startFolderCryptoJobFlowFunction · 0.85

Calls 1

folderSVGFunction · 0.85

Tested by

no test coverage detected