webui: fix relative timestamps (seconds, not milliseconds)
f.date/f.ago assumed JS milliseconds, but the backend emits Unix epoch seconds everywhere (created_at, feed lastUpdate, rule lastMatch, …), so every real timestamp rendered as ~20607 days ago (now - ~1.78e9 ms). Treat the formatter input as seconds. Search results show the indexer's pubDate string directly rather than mis-parsing it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
2df3f11cf4
commit
d1b90cfdcb
2 changed files with 8 additions and 7 deletions
|
|
@ -1426,7 +1426,7 @@ function searchTable(rows) {
|
|||
${rows.map((r, i) => `<tr>
|
||||
<td>${f.esc(r.name)}</td><td class="num">${f.bytes(r.size)}</td>
|
||||
<td class="num" style="color:var(--up)">${r.seeds}</td><td class="num dim">${r.leeches}</td>
|
||||
<td class="dim">${f.esc(r.engine)}</td><td class="num dim">${f.ago(r.pubDate)}</td>
|
||||
<td class="dim">${f.esc(r.engine)}</td><td class="num dim">${r.pubDate ? f.esc(r.pubDate) : '–'}</td>
|
||||
<td><button class="btn" data-sr="${i}">+ Add</button></td></tr>`).join('')}
|
||||
</tbody></table>`;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue