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
@@ -92,7 +92,7 @@ export async function renderSystem(root) {
|
||||
|
||||
<section class="panel">
|
||||
${sectionHeader("预计下次运行")}
|
||||
<div class="status-grid">
|
||||
<div class="status-grid status-row-3">
|
||||
<div><span>搜索发现</span><strong>${escapeHtml(formatDateTime(next.discover))}</strong></div>
|
||||
<div><span>每日快照</span><strong>${escapeHtml(formatDateTime(next.snapshot))}</strong></div>
|
||||
<div><span>发现周期</span><strong>${system.schedule.discover_minutes} 分钟</strong></div>
|
||||
@@ -100,21 +100,6 @@ export async function renderSystem(root) {
|
||||
<p class="section-note">预计时间按配置和最近任务完成时间推算;实际以常驻进程为准。</p>
|
||||
</section>
|
||||
|
||||
<section class="panel">
|
||||
${sectionHeader("历史收藏夹")}
|
||||
<p class="section-note">系统已不再同步收藏夹;下列统计仅保留历史来源。收藏夹由人工维护,重排序使用 favsort.py。</p>
|
||||
${(system.folders || []).map((folder) => `
|
||||
<div class="capacity-row">
|
||||
<div class="capacity-label">
|
||||
<span>${escapeHtml(folder.title || String(folder.year))}</span>
|
||||
<strong>${formatCount(folder.media_count)} / ${formatCount(folder.capacity)}</strong>
|
||||
</div>
|
||||
<div class="capacity-track"><span style="width:${Math.min(100, folder.ratio * 100)}%"
|
||||
class="${folder.warning ? "warning" : ""}"></span></div>
|
||||
<p class="section-note">历史快照 ${escapeHtml(formatDateTime(folder.last_ids_at))}</p>
|
||||
</div>`).join("") || emptyState("无历史收藏夹记录")}
|
||||
</section>
|
||||
|
||||
<section class="panel">
|
||||
${sectionHeader("授权与备份")}
|
||||
<div class="status-grid">
|
||||
|
||||
@@ -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