diff --git a/web/static/app.css b/web/static/app.css index 23958dc..15bf594 100644 --- a/web/static/app.css +++ b/web/static/app.css @@ -149,7 +149,9 @@ th { } td { padding: 10px 16px; border-bottom: 1px solid var(--border); } tr:last-child td { border-bottom: none; } +tr.row { cursor: pointer; } tr.row:hover td { background: var(--surface-2); } +tr.row:hover td a.slug { color: var(--accent); } td a.slug { font-family: var(--font-mono); font-size: 12.5px; color: var(--fg); text-decoration: none; } td a.slug:hover { color: var(--accent); } .badge { font-size: 11px; border: 1px solid var(--border); color: var(--muted-fg); border-radius: 999px; padding: 1px 8px; } diff --git a/web/templates/history.html b/web/templates/history.html index da5788a..9dd2e03 100644 --- a/web/templates/history.html +++ b/web/templates/history.html @@ -48,7 +48,7 @@ async function load() { } else { $('empty').style.display = 'none'; rows.innerHTML = data.items.map(it => - `${esc(it.id)}` + + `${esc(it.id)}` + `${it.title ? esc(it.title) : ''}` + `${esc(it.language || 'text')}` + `${fmtSize(it.size)}${it.view_count}${ago(it.created_at)}` @@ -82,6 +82,11 @@ $('pg').addEventListener('click', e => { load(); window.scrollTo(0, 0); }); +$('rows').addEventListener('click', e => { + const tr = e.target.closest('tr.row[data-href]'); + if (!tr || e.target.closest('a')) return; // let real links (e.g. middle-click) work + window.location.href = tr.dataset.href; +}); $('filter').addEventListener('input', () => { page = 1; load(); }); load(); setInterval(load, 30000); // auto-refresh history every 30s