uga aga
This commit is contained in:
@@ -168,6 +168,32 @@ window.escapeHtmlUpload = window.escapeHtmlUpload || ((unsafe) => {
|
||||
const row = _$('uut-active-list')?.querySelector(`[data-jid="${CSS.escape(jobId)}"]`);
|
||||
if (row) { row.classList.add('uut-job--fading'); setTimeout(() => row.remove(), 300); }
|
||||
setTimeout(() => { _active.delete(jobId); _sync(); }, 350);
|
||||
|
||||
const itemId = notif.item_id;
|
||||
if (itemId && window.NotificationSystemInstance && typeof window.NotificationSystemInstance.handleNewItem === 'function') {
|
||||
const grid = document.querySelector('.posts');
|
||||
if (grid && !grid.querySelector(`a[href$="/${itemId}"]`)) {
|
||||
fetch(`/api/v2/item/${itemId}`)
|
||||
.then(r => r.json())
|
||||
.then(res => {
|
||||
if (res && res.success && res.rows) {
|
||||
const item = res.rows;
|
||||
window.NotificationSystemInstance.handleNewItem({
|
||||
id: item.id,
|
||||
dest: item.dest,
|
||||
mime: item.mime,
|
||||
username: item.username,
|
||||
display_name: item.display_name || null,
|
||||
tag_id: item.rating_tag_id || item.tag_id || 0,
|
||||
is_oc: !!item.is_oc,
|
||||
slug: item.slug,
|
||||
visibility: item.visibility || 0
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(err => console.error('[UrlTracker] Failed to fetch item for live injection:', err));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Failure: update the row to show the error, keep until user closes
|
||||
const row = _$('uut-active-list')?.querySelector(`[data-jid="${CSS.escape(jobId)}"]`);
|
||||
|
||||
Reference in New Issue
Block a user