From 09f43ef78ef9b5ad0c2f1cc33ae30cd3b0ac16d7 Mon Sep 17 00:00:00 2001 From: Estrella Pan Date: Tue, 20 Oct 2026 17:30:20 +0200 Subject: [PATCH] =?UTF-8?q?perf(webui):=20=E5=8F=AA=E6=89=93=E5=8C=85=20Vu?= =?UTF-8?q?e=20=E8=BF=90=E8=A1=8C=E6=97=B6=E3=80=81=E6=8C=89=E9=9C=80?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=20zh-CN=20=E8=AF=AD=E8=A8=80=E5=8C=85?= =?UTF-8?q?=E4=B8=8E=E5=B8=83=E5=B1=80=E5=BC=B9=E7=AA=97=EF=BC=8C=E5=BE=85?= =?UTF-8?q?=E5=AE=A1=E6=A0=B8=E5=85=89=E6=99=95=E6=94=B9=E4=B8=BA=20opacit?= =?UTF-8?q?y=20=E5=8A=A8=E7=94=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webui/src/components/ab-bangumi-card.vue | 30 +++++++++++++--- webui/src/components/ab-search-bar.vue | 10 ++++-- webui/src/components/layout/ab-topbar.vue | 12 ++++++- .../src/components/search/ab-search-modal.vue | 4 +-- webui/src/hooks/useLazyModal.ts | 28 +++++++++++++++ webui/src/hooks/useMyI18n.ts | 36 +++++++++++++------ webui/src/main.ts | 5 +-- webui/src/pages/index.vue | 15 ++++++-- webui/types/dts/auto-imports.d.ts | 3 ++ webui/vite.config.ts | 9 ++++- 10 files changed, 126 insertions(+), 26 deletions(-) create mode 100644 webui/src/hooks/useLazyModal.ts diff --git a/webui/src/components/ab-bangumi-card.vue b/webui/src/components/ab-bangumi-card.vue index eefca765..2dc6e979 100644 --- a/webui/src/components/ab-bangumi-card.vue +++ b/webui/src/components/ab-bangumi-card.vue @@ -200,18 +200,40 @@ const posterSrc = computed(() => resolvePosterUrl(bangumi.poster_link)); display: block; } -// Card glow animation when needs review - yellow +// 待审核的黄色光晕:静态 box-shadow 放在 ::after 上,只动画 opacity(合成器线程, +// 不触发每帧重绘)。光晕在海报外侧,所以这里取消 overflow 裁剪,由子元素继承圆角 .card-poster--needs-review { - animation: card-glow 2.5s ease-in-out infinite; + overflow: visible; + + > * { + border-radius: inherit; + } + + &::after { + content: ''; + position: absolute; + inset: 0; + border-radius: inherit; + box-shadow: 0 0 16px 4px rgba(251, 191, 36, 0.6); + pointer-events: none; + animation: card-glow 2.5s ease-in-out infinite; + } + + @media (prefers-reduced-motion: reduce) { + &::after { + animation: none; + opacity: 0.5; + } + } } @keyframes card-glow { 0%, 100% { - box-shadow: var(--shadow-md), 0 0 0 0 rgba(251, 191, 36, 0); + opacity: 0; } 50% { - box-shadow: var(--shadow-md), 0 0 16px 4px rgba(251, 191, 36, 0.6); + opacity: 1; } } diff --git a/webui/src/components/ab-search-bar.vue b/webui/src/components/ab-search-bar.vue index 5b9b8ecb..6b84a939 100644 --- a/webui/src/components/ab-search-bar.vue +++ b/webui/src/components/ab-search-bar.vue @@ -1,9 +1,13 @@