mirror of
https://github.com/Syngnat/GoNavi.git
synced 2026-08-10 08:43:34 +08:00
🐛 fix(update): 恢复检查更新按钮加载动效
- 为设置中心加载图标恢复持续旋转 - 保留其他界面的减少动态效果策略 - 补充 reduced-motion 样式回归测试
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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;[^}]*\}/,
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user