From 181a55a830ba4f2da67bb4addb7c26606db7dccb Mon Sep 17 00:00:00 2001 From: x1ao4 Date: Wed, 17 Sep 2025 03:12:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=BB=E5=8A=A1=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=B5=B7=E6=8A=A5=E8=A7=86=E5=9B=BE=E7=9A=84=E6=B8=B2?= =?UTF-8?q?=E6=9F=93=E9=80=BB=E8=BE=91=E5=92=8C=E5=8A=A0=E8=BD=BD=E7=AD=96?= =?UTF-8?q?=E7=95=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 任务列表海报视图改为 “海报先渲染”,操作区/徽标/悬浮信息按图片加载完成后再渲染 - 图片加载加入 `decoding=async`、`loading=lazy`、`fetchpriority`,首屏更快、非首屏延后 - 任务列表视图下停用全局 bust,保留节目级/名称级 bust,确保更换海报仍能热更新且避免本地缓存反复失效 --- app/static/css/main.css | 2 ++ app/templates/index.html | 26 +++++++++++++++++++------- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/app/static/css/main.css b/app/static/css/main.css index 78eda54..d70673e 100644 --- a/app/static/css/main.css +++ b/app/static/css/main.css @@ -6384,6 +6384,8 @@ body .selectable-files tr.selected-file:has([style*="white-space: normal"]) .fil overflow: hidden; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); margin-bottom: 10px; + /* 默认占位背景,避免纯白闪烁 */ + background: #f3f3f3 url('../images/no-poster.svg') center/contain no-repeat; } .discovery-poster img { diff --git a/app/templates/index.html b/app/templates/index.html index 5e44741..c0ea09b 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -1236,17 +1236,21 @@
-
+
-
+
@@ -1281,7 +1285,7 @@
{{ getTransferProgress(getCalendarTaskByName(task.taskname)) }}% @@ -1289,7 +1293,7 @@ -
+
#{{ String((task.__originalIndex !== undefined ? task.__originalIndex : index) + 1).padStart(2, '0') }}
@@ -3187,6 +3191,8 @@ // 任务列表视图模式:list 或 poster(默认列表视图,支持持久化) viewMode: (localStorage.getItem('tasklist_view_mode') === 'poster') ? 'poster' : 'list' }, + // 任务列表海报加载标记:taskname -> boolean(用于优先显示图片,再渐进显示其他信息) + tasklistPosterLoaded: {}, // 任务列表排序设置(记忆到localStorage) tasklistSort: (() => { try { @@ -5888,7 +5894,13 @@ } else if (sname && this.imageCacheBustByShowName && this.imageCacheBustByShowName[sname]) { tick = this.imageCacheBustByShowName[sname]; } else { - tick = this.imageCacheBustTick || 0; + // 优化:任务列表海报视图下,未命中特定节目/名称的情况下不使用全局穿透参数,避免本地海报反复绕过浏览器缓存 + // 仅对日历等视图保留全局 bust(以确保热更新及时生效) + if (this.activeTab === 'calendar') { + tick = this.imageCacheBustTick || 0; + } else { + tick = 0; + } } } catch (e) { tick = this.imageCacheBustTick || 0; } return tick ? `${path}?t=${tick}` : path;