Peach: Local-first video metadata scraper and media manager.
移除视频详情加载占位
longmeidaoace41baa164c
diff --git a/tests/test_web_ui.py b/tests/test_web_ui.pyindex 7bbf5e8ed..d1088e295 100644--- a/tests/test_web_ui.py+++ b/tests/test_web_ui.py@@ -1512,11 +1512,12 @@ class WebUiSourceTests(unittest.TestCase):self.assertPageContains("stage.style.scrollMarginTop=`${itemDetailStickyOffset()+8}px`")self.assertPageContains("buildBars();\n scrollItemDetailIntoView();")- def test_catalog_and_item_detail_loading_reuse_the_spinner_component(self):+ def test_catalog_loading_reuses_the_spinner_without_flashing_an_item_placeholder(self):self.assertPageContains("function renderCatalogLoading(label='正在读取作品')")self.assertPageContains("count.innerHTML=`${spinnerHtml(label)}<span>载入中…</span>`")- self.assertPageContains("${spinnerHtml('正在加载详情')}<span>正在加载详情…</span>")- self.assertPageContains('class="detailpending" role="status" aria-busy="true"')+ self.assertPageLacks("function showItemDetailLoading(anchor,above)")+ self.assertPageLacks("detailpending")+ self.assertPageLacks("showItemDetailLoading(origin,above)")def test_entity_profile_uses_logo_links_without_a_redundant_back_row(self):self.assertPageContains("const faviconUrl=url=>")diff --git a/web/app.css b/web/app.cssindex 9f26a11d8..220b9bcde 100644--- a/web/app.css+++ b/web/app.css@@ -919,8 +919,6 @@ body[data-density="dense"] .card .meta .watchcount{display:none}.stage:not(.ambient-on){background:color-mix(in srgb,var(--surface) 88%,transparent)}.stage[hidden]{display:none}.grid>.stage{grid-column:1/-1;width:100%;min-width:0}-.detailpending{min-height:144px;display:flex;align-items:center;justify-content:center;gap:10px;color:var(--muted)}-.detailpending .geist-spinner{color:var(--ink)}body.entity-open #tiers,body.entity-open #tagbar,body.index-open #tiers,body.index-open #tagbar{display:none}.sgrid{display:grid;grid-template-columns:minmax(0,1fr) minmax(350px,390px)}diff --git a/web/app.js b/web/app.jsindex e8df7a8b1..6138de8e5 100644--- a/web/app.js+++ b/web/app.js@@ -390,13 +390,6 @@ function placeItemDetail(anchor,above=false){else main.insertBefore(stage,combo);}-function showItemDetailLoading(anchor,above){- const stage=$('#stage');placeItemDetail(anchor,above);- stage.hidden=false;document.body.classList.add('detail-open');- stage.innerHTML=`<div class="detailpending" role="status" aria-busy="true">- ${spinnerHtml('正在加载详情')}<span>正在加载详情…</span></div>`;-}-function itemDetailStickyOffset(){const stage=$('#stage');return ['.top','#tagbar','#count','.entitycollectionhead'].reduce((bottom,selector)=>{@@ -4771,7 +4764,6 @@ async function openItem(id,push=true,queueContext=null,anchor=null){activeQueue=queueContext;if(push&&!queueContext)route('/item/'+id);const detailSurface=surfaceToken(surfacePath());- showItemDetailLoading(origin,above);const it=await api('/api/item?id='+id); if(it.error)return;if(!surfaceCurrent(detailSurface))return;current=it; CACHE[it.id]=it;