mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-06-29 16:12:06 -04:00
Email Library: render tag chips + spam verdict pill on the email row
This commit is contained in:
@@ -2936,6 +2936,20 @@ function _createCard(em) {
|
|||||||
titleRow.appendChild(att);
|
titleRow.appendChild(att);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const tags = Array.isArray(em.tags) ? em.tags : [];
|
||||||
|
if (tags.length || em.is_spam_verdict) {
|
||||||
|
const tagWrap = document.createElement('span');
|
||||||
|
tagWrap.className = 'email-tags email-card-tags';
|
||||||
|
tagWrap.innerHTML = tags.map(t => {
|
||||||
|
const tag = String(t || '').trim().toLowerCase().replace(/_/g, '-');
|
||||||
|
return tag ? `<span class="email-tag email-tag-${_esc(tag)}">${_esc(tag)}</span>` : '';
|
||||||
|
}).join('');
|
||||||
|
if (em.is_spam_verdict) {
|
||||||
|
tagWrap.insertAdjacentHTML('beforeend', '<span class="email-tag email-tag-spam">spam</span>');
|
||||||
|
}
|
||||||
|
titleRow.appendChild(tagWrap);
|
||||||
|
}
|
||||||
|
|
||||||
// Done check + unread dot stay next to the subject on the left.
|
// Done check + unread dot stay next to the subject on the left.
|
||||||
const isSentFolder = /sent/i.test(state._libFolder);
|
const isSentFolder = /sent/i.test(state._libFolder);
|
||||||
if (!isSentFolder) {
|
if (!isSentFolder) {
|
||||||
|
|||||||
Reference in New Issue
Block a user