From 3156d8df7f1eda241f718aed1b7507f3b3669505 Mon Sep 17 00:00:00 2001 From: Syngnat Date: Tue, 28 Jul 2026 09:55:48 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(update):=20=E6=81=A2?= =?UTF-8?q?=E5=A4=8D=E6=A3=80=E6=9F=A5=E6=9B=B4=E6=96=B0=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E5=8A=A8=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 为设置中心加载图标恢复持续旋转 - 保留其他界面的减少动态效果策略 - 补充 reduced-motion 样式回归测试 --- frontend/src/App.css | 6 ++++++ frontend/src/App.tool-center.test.ts | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/frontend/src/App.css b/frontend/src/App.css index 9a6a0fda..8a58caee 100644 --- a/frontend/src/App.css +++ b/frontend/src/App.css @@ -3036,6 +3036,12 @@ body[data-theme='dark'] .gonavi-settings-center-entry:hover { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; } + + /* Loading indicators communicate ongoing work, rather than decorative motion. */ + .gonavi-settings-center-modal .ant-btn-loading-icon .anticon-spin { + animation-duration: 1s !important; + animation-iteration-count: infinite !important; + } } .gonavi-ai-settings-nav-description { diff --git a/frontend/src/App.tool-center.test.ts b/frontend/src/App.tool-center.test.ts index 6e626d71..0e3f61fe 100644 --- a/frontend/src/App.tool-center.test.ts +++ b/frontend/src/App.tool-center.test.ts @@ -6,6 +6,10 @@ const appSource = readFileSync( fileURLToPath(new globalThis.URL('./App.tsx', import.meta.url)), 'utf8', ); +const appCss = readFileSync( + fileURLToPath(new globalThis.URL('./App.css', import.meta.url)), + 'utf8', +); describe('settings center tool entries', () => { @@ -25,4 +29,10 @@ describe('settings center tool entries', () => { const minimiseProbeIndex = resizeHandlerSource.indexOf('rememberMinimisedStateSoon();'); const dprCheckIndex = resizeHandlerSource.indexOf("scheduleDevicePixelRatioCheck('resize');"); }); + + it('keeps button loading indicators animated when reduced motion is enabled', () => { + expect(appCss).toMatch( + /@media \(prefers-reduced-motion: reduce\) \{[\s\S]*?\.gonavi-settings-center-modal \.ant-btn-loading-icon \.anticon-spin \{[^}]*animation-duration: 1s !important;[^}]*animation-iteration-count: infinite !important;[^}]*\}/, + ); + }); });