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

Function renderMeta

deployments/desktop/static/reports.js:229–257  ·  view source on GitHub ↗
(report)

Source from the content-addressed store, hash-verified

227 }
228
229 function renderMeta(report) {
230 const target = byId("reportMetadata");
231 if (!target) return;
232 const metadata = report.metadata || {};
233 const rows = [
234 ["user_id", report.user_id || metadata.user_id || ""],
235 ["paper_id", report.paper_id || metadata.paper_id || ""],
236 ["arxiv_id", report.arxiv_id || metadata.arxiv_id || ""],
237 ["saved_at", report.saved_at || metadata.saved_at || ""],
238 ["report_version", report.report_version || metadata.report_version || ""],
239 ["generation_provider", report.generation_provider || metadata.generation_provider || ""],
240 ["generation_model", report.generation_model || metadata.generation_model || ""],
241 ["doc_token", report.doc_token || metadata.doc_token || ""],
242 ["report_path", report.report_path || ""],
243 ].filter(([, value]) => String(value || "").trim());
244
245 if (!rows.length) {
246 target.className = "settings-list empty";
247 target.textContent = "暂无元数据。";
248 return;
249 }
250 target.className = "report-meta-grid";
251 target.innerHTML = rows.map(([label, value]) => `
252 <div class="report-meta-item">
253 <strong>${window.escapeHtml ? window.escapeHtml(label) : label}</strong>
254 <code>${window.escapeHtml ? window.escapeHtml(value) : value}</code>
255 </div>
256 `).join("");
257 }
258
259 function renderEmpty(message) {
260 uiState.currentReport = null;

Callers 1

renderViewerFunction · 0.85

Calls 1

byIdFunction · 0.85

Tested by

no test coverage detected