feat(web): visit 204 response, up page header/sort, trim system page
This commit is contained in:
1 parent
e3bd2e601b
commit
84ce1e41e8
7 files changed
+41
-54
No files matched your search
@@ -9,7 +9,7 @@ import {
|
||||
import { replaceQuery } from "../router.js";
|
||||
|
||||
const SORTS = [
|
||||
["view", "播放"], ["efficiency", "内容效率"], ["latest", "最新发布"],
|
||||
["latest", "发布时间"], ["view", "播放"], ["efficiency", "内容效率"],
|
||||
["interaction", "互动率"],
|
||||
];
|
||||
|
||||
@@ -29,7 +29,7 @@ function sortedVideos(videos, sort) {
|
||||
|
||||
export async function renderUp(root, { params, query }) {
|
||||
const mid = Number(params[0]);
|
||||
const sort = query.get("sort") || "view";
|
||||
const sort = query.get("sort") || "latest";
|
||||
const up = await api(`/api/ups/${mid}`);
|
||||
const videos = sortedVideos(up.videos || [], sort);
|
||||
const topForBar = [...(up.videos || [])]
|
||||
@@ -47,12 +47,9 @@ export async function renderUp(root, { params, query }) {
|
||||
${avatar(up, "hero-avatar")}
|
||||
<div class="detail-hero-body">
|
||||
<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") : ""}
|
||||
</div>
|
||||
<p class="section-note">最近发布 ${escapeHtml(formatDate(up.latest_pubdate))}</p>
|
||||
${up.blacklisted ? `<div class="detail-meta">${badge("黑名单 · 仅影响发现", "warning")}</div>` : ""}
|
||||
<p class="section-note">首次观看 ${escapeHtml(formatDate(up.first_pubdate))}</p>
|
||||
<p class="section-note">最近观看 ${escapeHtml(formatDate(up.latest_pubdate))}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user