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

Function renderMustRead

deployments/desktop/static/app.js:1183–1202  ·  view source on GitHub ↗
(mustRead)

Source from the content-addressed store, hash-verified

1181}
1182
1183function renderMustRead(mustRead) {
1184 const groups = [
1185 ["作者", "authors"],
1186 ["机构", "institutions"],
1187 ["关键词", "keywords"],
1188 ];
1189 $("mustReadList").className = "must-grid";
1190 $("mustReadList").innerHTML = groups.map(([label, key]) => {
1191 const values = mustRead[key] || [];
1192 const body = values.length
1193 ? values.map((value) => `<span class="pill">${escapeHtml(value)}</span>`).join("")
1194 : `<span class="empty">空</span>`;
1195 return `
1196 <div class="must-card">
1197 <h4>${label}</h4>
1198 <div class="pill-list">${body}</div>
1199 </div>
1200 `;
1201 }).join("");
1202}
1203
1204async function updateMustRead(action) {
1205 const userId = ensureUser();

Callers 2

refreshMustReadFunction · 0.85
updateMustReadFunction · 0.85

Calls 2

$Function · 0.70
escapeHtmlFunction · 0.70

Tested by

no test coverage detected