Peach: Local-first video metadata scraper and media manager.
fix(web):保留必需凭据自动展开并准确展示候选计数
longmeidao6bf2d7b5fec9
diff --git a/frontend/src/islands/library-processing.tsx b/frontend/src/islands/library-processing.tsxindex 75c8fb00e..ab5e02d1b 100644--- a/frontend/src/islands/library-processing.tsx+++ b/frontend/src/islands/library-processing.tsx@@ -63,7 +63,7 @@ export function LibraryProcessing({ data, error, toast, onComplete }: LibraryPro{(problem || state.status === 'failed') && <div role="alert" dangerouslySetInnerHTML={{ __html: noteHtml(problem || state.error || '处理未完成,请重试', { variant: 'error' }) }} />}{state.status === 'failed' && !!state.issues?.length && <ul>{state.issues.slice(0, 20).map(issue =><li>{issue.asset_id ? <a href={`/item/${issue.asset_id}`}>查看视频</a> : null}{issue.asset_id ? ':' : ''}{issue.message}</li>)}</ul>}- {receipt && <p>已扫描 {state.scanned || 0} 个文件,识别 {state.identified || 0} 个番号,生成 {state.candidates || 0} 组待复核资料。</p>}+ {receipt && <p>已扫描 {state.scanned || 0} 个文件,识别 {state.identified || 0} 个番号,整理 {state.candidates || 0} 组资料候选。</p>}</div></div><footer class="geist-fieldset-footer" data-geist-fieldset-footer>diff --git a/tests/test_follow_web.py b/tests/test_follow_web.pyindex 295381f6e..d4271e4ab 100644--- a/tests/test_follow_web.py+++ b/tests/test_follow_web.py@@ -2309,10 +2309,10 @@ class FollowWebSourceTests(unittest.TestCase):self.assertPageContains("form.reset();await openFollowManage(false)")self.assertPageContains("data-cred-clear")- def test_credentials_are_collapsed_and_the_source_menu_offers_configuration(self):+ def test_required_credentials_expand_and_the_source_menu_offers_configuration(self):self.assertPageContains("row?.requirement==='required'")self.assertPageContains('data-srcfilter-config=')- self.assertNotIn("${needsAttention?' open':''}", self.page)+ self.assertPageContains("${needsAttention?' open':''}")def test_the_watch_page_does_not_carry_source_management(self):# 输入框、移除、凭据都只属于管理页;看的那页保持干净。diff --git a/tests/test_metadata_library.py b/tests/test_metadata_library.pyindex b080a43e0..f6ec12f34 100644--- a/tests/test_metadata_library.py+++ b/tests/test_metadata_library.py@@ -155,7 +155,7 @@ class LibraryNfoTests(unittest.TestCase):self.assertIn('const sources=[...credentials,...(followData?.sources||[])];', source)self.assertIn('data-srcfilter-config=', source)self.assertNotIn("if(!providers.length){mount.innerHTML='';return}", source)- self.assertNotIn("needsAttention?' open':''", source)+ self.assertIn("needsAttention?' open':''", source)self.assertIn('还没有内容标签', source)self.assertIn('还没有存储来源', source)self.assertIn("totalVideos?locationRows:catalogEmptyHtml", source)diff --git a/web/app.js b/web/app.jsindex a8aae1ce7..15983d894 100644--- a/web/app.js+++ b/web/app.js@@ -4933,6 +4933,7 @@ function followSuggestionChips(list){function followCredentialRow(row){const [label,kind]=CRED_STATE[row.requirement]||CRED_STATE.none;const configured=row.present&&!row.missing.length;+ const needsAttention=row.requirement==='required'&&!configured;const fields=(row.needs||[]).map(name=>`<label class="fcredfield"><span>${esc(name)}</span><input type="password" name="${esc(name)}" autocomplete="off" spellcheck="false"@@ -4957,7 +4958,7 @@ function followCredentialRow(row){const mark=`<span class="ficonslot" aria-hidden="true">${sourceIcon(row.provider)}</span>`;if(!body)return `<div class="frow fcred none">${mark}<b>${esc(row.provider_label)}</b><span class="fcstate none">${esc(label)}</span></div>`;- return `<details class="frow fcred ${esc(kind)}${configured?' ok':''}">+ return `<details class="frow fcred ${esc(kind)}${configured?' ok':''}"${needsAttention?' open':''}><summary>${mark}<b>${esc(row.provider_label)}</b><span class="fcstate ${configured?'done':esc(kind)}">${esc(configured?'已配置':label)}</span>${row.missing.length?`<span class="fcstate missing">缺 ${esc(row.missing.join('、'))}</span>`:''}diff --git a/web/dist/peach-ui.js b/web/dist/peach-ui.jsindex 0aad8ba96..850b989d6 100644--- a/web/dist/peach-ui.js+++ b/web/dist/peach-ui.js@@ -1888,9 +1888,9 @@ function en({ data: e, error: t, toast: o, onComplete: s }) {l.scanned || 0," 个文件,识别 ",l.identified || 0,- " 个番号,生成 ",+ " 个番号,整理 ",l.candidates || 0,- " 组待复核资料。"+ " 组资料候选。"] })]})