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

Function buildSectionLabelHtml

public/js/adminPanel.js:6838–6843  ·  view source on GitHub ↗
(title, { showPro = false, showNew = false } = {})

Source from the content-addressed store, hash-verified

6836 const sectionProPillHtml = '<span class="btn-pro-pill" style="position:static; display:inline-flex; align-items:center; margin:0;">Pro</span>';
6837 const sectionNewPillHtml = '<span class="badge badge-pill badge-info" style="font-size:10px; line-height:1.2; padding:2px 6px;">New</span>';
6838 const buildSectionLabelHtml = (title, { showPro = false, showNew = false } = {}) => {
6839 const text = escapeHTML(String(title || '').trim());
6840 const proPill = showPro ? sectionProPillHtml : '';
6841 const newPill = showNew ? sectionNewPillHtml : '';
6842 return `<span style="display:inline-flex; align-items:center; gap:6px;">${text}${proPill}${newPill}</span>`;
6843 };
6844 const setSectionHeaderLabel = (sectionId, labelHtml) => {
6845 const headerEl = document.getElementById(sectionId + 'Header');
6846 if (!headerEl) return;

Callers 1

openAdminPanelFunction · 0.85

Calls 1

escapeHTMLFunction · 0.85

Tested by

no test coverage detected