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

Function renderPortalSourceOptions

public/js/adminPortals.js:675–682  ·  view source on GitHub ↗
(selectedId)

Source from the content-addressed store, hash-verified

673}
674
675function renderPortalSourceOptions(selectedId) {
676 const active = normalizePortalSourceId(selectedId) || getPortalSourceFallbackId();
677 return __portalSources.map(src => {
678 const label = src.name || src.id;
679 const disabledTag = src.enabled ? '' : ' (disabled)';
680 return `<option value="${escapeHTML(src.id)}"${src.id === active ? ' selected' : ''}>${escapeHTML(label)}${escapeHTML(disabledTag)}</option>`;
681 }).join('');
682}
683
684async function loadPortalFolderList(sourceId = '') {
685 const sourceKey = normalizePortalSourceId(sourceId) || getPortalSourceFallbackId();

Callers 1

loadClientPortalsListFunction · 0.85

Calls 3

normalizePortalSourceIdFunction · 0.85
escapeHTMLFunction · 0.85

Tested by

no test coverage detected