MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / renderWikiList

Function renderWikiList

deployments/desktop/static/desktop.js:3818–3839  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3816 }
3817
3818 function renderWikiList() {
3819 const nodes = state.wikiNodes.length ? state.wikiNodes : state.wikiGraph?.nodes?.length ? state.wikiGraph.nodes : DEMO_MODE ? demoWikiNodes : [];
3820 if (!nodes.length) {
3821 $("wikiGraph").innerHTML = `
3822 <div class="wiki-empty-state">
3823 <strong>${escapeHtml(ui().wiki.emptyListTitle)}</strong>
3824 <p>${escapeHtml(ui().wiki.emptyListBody)}</p>
3825 </div>
3826 `;
3827 return;
3828 }
3829 $("wikiGraph").innerHTML = `
3830 <div class="wiki-list-view">
3831 ${nodes.map((node) => `
3832 <button class="result-item" data-node-id="${escapeHtml(graphId(node))}" data-node-title="${escapeHtml(rawGraphTitle(node))}" data-node-body="${escapeHtml(rawGraphBody(node))}" type="button">
3833 <h3>${escapeHtml(graphTitle(node))} <span class="status-chip">${escapeHtml(graphTypeLabel(node))}</span></h3>
3834 <p>${escapeHtml(graphBody(node) || ui().wiki.noSummary)}</p>
3835 </button>
3836 `).join("")}
3837 </div>
3838 `;
3839 }
3840
3841 function graphNodesById() {
3842 const nodes = uniqueGraphNodes([

Callers 4

applyLocaleFunction · 0.85
setWikiViewFunction · 0.85
loadWikiFunction · 0.85
searchWikiFunction · 0.85

Calls 9

uiFunction · 0.85
graphIdFunction · 0.85
rawGraphTitleFunction · 0.85
rawGraphBodyFunction · 0.85
graphTitleFunction · 0.85
graphTypeLabelFunction · 0.85
graphBodyFunction · 0.85
$Function · 0.70
escapeHtmlFunction · 0.70

Tested by

no test coverage detected