feat(web): show first-RE time on up page, drop decoupled folder badges

This commit is contained in:
kairee committed 2026-11-01 14:41:32 +08:00
1 parent 2ff3e7952b
commit 5d7521075a
4 files changed
+6 -7

No files matched your search

-4
View File
@@ -1270,9 +1270,6 @@ class DashboardQueries:
view_by_date = {str(row["stat_date"]): int(row["view"] or 0) for row in rows}
dates = _date_range(min(view_by_date), latest) if view_by_date else []
items.sort(key=lambda item: ((item["metrics"] or {}).get("view", 0), item["pubdate"]), reverse=True)
folder_titles = sorted({
str(item["folder_title"]) for item in items if item.get("folder_title")
})
return {
"up_mid": mid,
"up_name": items[0].get("up_name") or f"UP {mid}",
@@ -1304,7 +1301,6 @@ class DashboardQueries:
"follower_latest": None if profile is None else profile["follower_latest"],
"first_pubdate": min(item["pubdate"] for item in items),
"latest_pubdate": max(item["pubdate"] for item in items),
"folders": folder_titles,
"blacklisted": bool(conn.execute(
"SELECT 1 FROM up_blacklist WHERE mid = ?", (mid,)
).fetchone()),
+2 -2
View File
@@ -49,10 +49,10 @@ export async function renderUp(root, { params, query }) {
<h1>${escapeHtml(up.up_name || `UP ${mid}`)}</h1>
<div class="detail-meta">
<span>mid ${up.up_mid}</span>
<span>首RE时间 ${escapeHtml(formatDate(up.first_pubdate))}</span>
${up.blacklisted ? badge("黑名单 · 仅影响发现", "warning") : ""}
${(up.folders || []).map((title) => badge(title)).join("")}
</div>
<p class="section-note">首次发布 ${escapeHtml(formatDate(up.first_pubdate))} · 最近发布 ${escapeHtml(formatDate(up.latest_pubdate))}</p>
<p class="section-note">最近发布 ${escapeHtml(formatDate(up.latest_pubdate))}</p>
</div>
</div>
</div>