fix(ui): 修复无动画模式卡片消失(no-anim 显式置为最终态) animation:none 会停住动画但保留 opacity:0 基础样式;改用 no-anim 类显式 opacity:1/transform:none

This commit is contained in:
2026-08-05 07:43:16 +08:00
parent fc52caddfd
commit 4cf31c76bb
2 changed files with 12 additions and 3 deletions
+5 -3
View File
@@ -189,8 +189,9 @@
st.cls === "err" ? "error" : "",
st.cls === "disabled" ? "disabled" : "",
st.cls === "pending" ? "pending" : "",
animate ? "" : "no-anim",
].join(" ").trim();
const animStyle = animate ? `animation-delay:${Math.min(idx, 12) * 40}ms` : "animation:none";
const animStyle = animate ? `animation-delay:${Math.min(idx, 12) * 40}ms` : "";
const win = accountWindows[a.id] || "all";
let hist;
if (win === "all") {
@@ -355,9 +356,10 @@
list.innerHTML = platforms.map((p, i) => {
const b = brandStyle(p.icon || "");
const prov = providersList.find((x) => x.id === p.provider_id);
const animStyle = animate ? `animation-delay:${Math.min(i, 10) * 35}ms` : "animation:none";
const animStyle = animate ? `animation-delay:${Math.min(i, 10) * 35}ms` : "";
const rowCls = `platform-row ${p.enabled ? "" : "platform-off"}${animate ? "" : " no-anim"}`;
return `
<div class="platform-row ${p.enabled ? "" : "platform-off"}" style="${animStyle}">
<div class="${rowCls}" style="${animStyle}">
<div class="badge" style="background:${b.color}">${escapeHtml(b.abbr)}</div>
<div class="platform-info">
<div class="platform-name">${escapeHtml(p.name)}
+7
View File
@@ -408,6 +408,13 @@ label { font-size: 12px; font-weight: 500; color: var(--text-2); margin-bottom:
.account-card { opacity: 1; transform: none; }
}
/* 无动画模式:自动刷新静默更新,直接以最终态显示 */
.account-card.no-anim, .platform-row.no-anim {
opacity: 1;
transform: none;
animation: none;
}
/* ===== 账号监控:筛选栏 ===== */
.filter-bar {
display: flex;