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

Function renderActivityList

deployments/desktop/static/app.js:1155–1174  ·  view source on GitHub ↗
(targetId, items, filter)

Source from the content-addressed store, hash-verified

1153}
1154
1155function renderActivityList(targetId, items, filter) {
1156 const target = $(targetId);
1157 if (!target) return;
1158 if (filter) {
1159 items = items.filter((item) => item.action === filter || item.action_type === filter);
1160 }
1161 if (!items.length) {
1162 target.className = "activity-list empty";
1163 target.textContent = "暂无最近活动。";
1164 return;
1165 }
1166 target.className = "activity-list";
1167 target.innerHTML = items.map((item) => `
1168 <div class="activity-item">
1169 <h4>${escapeHtml(labelAction(item.action))} | ${escapeHtml(labelAction(item.action_type || ""))}</h4>
1170 <p>${escapeHtml(item.paper_title || item.push_id || "")}</p>
1171 <p>${escapeHtml(item.timestamp || "")}</p>
1172 </div>
1173 `).join("");
1174}
1175
1176async function refreshMustRead() {
1177 const userId = activeUser();

Callers 1

renderActivityFunction · 0.85

Calls 3

labelActionFunction · 0.85
$Function · 0.70
escapeHtmlFunction · 0.70

Tested by

no test coverage detected