feat(web): use history routing and preserve scroll on filter changes

This commit is contained in:
kairee committed 2026-11-01 01:55:37 +08:00
1 parent 1b08854b25
commit 52a8d90c47
9 files changed
+113 -33

No files matched your search

+2 -2
View File
@@ -32,7 +32,7 @@ export function videoCard(item, { rank = null, primary = "view", showStatus = fa
const status = showStatus && item.status
? `<span class="badge status-${escapeAttr(item.status)}">${escapeHtml(statusLabel(item.status))}</span>` : "";
return `
<a class="video-card${rank ? "" : " no-rank"}" href="#/video/${item.aid}" data-aid="${item.aid}">
<a class="video-card${rank ? "" : " no-rank"}" href="/video/${item.aid}" data-aid="${item.aid}">
${rankBadge(rank)}
${cover(item, "video-thumb")}
<div class="video-card-body">
@@ -65,7 +65,7 @@ export function upCard(item, { rank = null } = {}) {
"video-thumb up-thumb",
);
return `
<a class="up-card" href="#/up/${item.up_mid}">
<a class="up-card" href="/up/${item.up_mid}">
${rankBadge(rank)}
${displayCover}
<div class="up-card-body">