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

Function refreshWiki

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

Source from the content-addressed store, hash-verified

4096 sourceEdgeCount: map.sourceEdges.length
4097 };
4098 }
4099
4100 function renderWikiGraph() {
4101 const target = $("wikiGraph");
4102 const graph = state.wikiGraph || {};
4103 const hasBackendGraph = Boolean(graph.nodes?.length);
4104 const graphNodes = hasBackendGraph ? graph.nodes : state.wikiNodes.length ? state.wikiNodes : DEMO_MODE ? demoWikiNodes : [];
4105 const graphEdges = hasBackendGraph ? graph.edges || [] : DEMO_MODE ? demoWikiEdges : [];
4106 const layout = layoutGraph(graphNodes, graphEdges);
4107 if (!layout.nodes.length) {
4108 target.innerHTML = `
4109 <div class="wiki-empty-state">
4110 <strong>${escapeHtml(ui().wiki.emptyGraphTitle)}</strong>
4111 <p>${escapeHtml(ui().wiki.emptyGraphBody)}</p>
4112 </div>
4113 `;
4114 return;
4115 }
4116 const spread = state.wikiGraphTransform.scale;
4117 const visualNodes = layout.nodes.map((node) => ({
4118 ...node,

Callers

nothing calls this directly

Calls 5

currentUserFunction · 0.85
loadWikiFunction · 0.85
uiFunction · 0.85
showFeedbackToastFunction · 0.85
apiFunction · 0.70

Tested by

no test coverage detected