feat(out): 恢复「下载中」角标(按「无本地源且为远程 url」判定,不依赖视图命中)

This commit is contained in:
qiqi committed 2026-12-02 20:01:01 +08:00
1 parent 3a70e16ead
commit e8894d6864
2 files changed
+6 -2

No files matched your search

+5 -1
View File
@@ -906,7 +906,11 @@
const actions = DlOv ? null : el('div', { className: 'iwb-out-cell-actions' },
el('button', { className: 'iwb-btn iwb-btn-sm', title: '下载', onClick: doDownload, onPointerDown: stop }, I('download')),
)
const ingBadge = ingSt && (ingSt.status === 'queued' || ingSt.status === 'downloading')
// 2026-12-02(用户要求恢复):角标不再只依赖视图命中 —— 只要这一格还没有本地源、
// 而结果又是远程 url,就说明还在从网络取图,直接标「下载中」,保证一定有可见反馈。
const _localSrc = (r && r.idb && r.data) ? r.data : ((r && r.url && outThumbCache.get(r.url)) || null)
const _remoteOnly = !_localSrc && !(ingSt && ingSt.localUrl) && /^https?:/i.test(String((r && r.url) || ''))
const ingBadge = (ingSt && (ingSt.status === 'queued' || ingSt.status === 'downloading')) || _remoteOnly
? el('span', { className: 'iwb-out-cell-flag', key: 'ing-flag' }, ingSt.status === 'queued' ? '排队中' : '下载中')
: (ingSt && ingSt.status === 'failed' ? el('span', { className: 'iwb-out-cell-flag iwb-out-cell-flag-err', key: 'ing-flag' }, '未落地') : null)
return el('div', { key: String(r.url || '') + '|' + ri, className: 'iwb-out-cell' },