(folder, encrypted)
| 3043 | } |
| 3044 | |
| 3045 | function 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 | |
| 3061 | function ensureCryptoJobUi() { |
| 3062 | if (__cryptoUiReady) return; |
no test coverage detected