🐛 fix(update): 恢复检查更新按钮加载动效

- 为设置中心加载图标恢复持续旋转
- 保留其他界面的减少动态效果策略
- 补充 reduced-motion 样式回归测试
This commit is contained in:
Syngnat
2026-07-28 09:55:48 +08:00
parent 861d4ace3f
commit 3156d8df7f
2 changed files with 16 additions and 0 deletions

View File

@@ -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 {

View File

@@ -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;[^}]*\}/,
);
});
});