1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 10:45:56 +00:00

render headline labels on the client

This commit is contained in:
Andrew Dolgov
2021-02-19 15:03:48 +03:00
parent 660a1bbe01
commit 131f34648d
4 changed files with 20 additions and 18 deletions

View File

@@ -130,6 +130,12 @@ const Article = {
Headlines.toggleUnread(id, 0);
},
renderLabels: function(id, labels) {
return `<span class="labels" data-labels-for="${id}">${labels.map((label) => `
<span class="label" data-label-id="${label[0]}"
style="color : ${label[2]}; background-color : ${label[3]}">${App.escapeHtml(label[1])}</span>`
).join("")}</span>`;
},
renderEnclosures: function (enclosures) {
// enclosure list was handled by backend (HOOK_FORMAT_ENCLOSURES)