fix(update-button): 检查更新按钮旋转方向与尺寸稳定

- ol-spin 改为逆时针,与 refresh(ccw)图标方向一致
- 按钮固定宽度 + 内容居中;图标固定 14x14 容器,check/refresh 切换与旋转时不再跳动
This commit is contained in:
sim authored and TRIP committed 2026-08-03 11:15:30 +08:00
1 parent e12c8dcc20
commit c4290071b0
2 files changed
+13 -8

No files matched your search

@@ -43,13 +43,17 @@ export function CheckUpdateButton({ channel }: { channel: UpdateChannel }) {
? t('settings.about.upToDate')
: undefined
}
style={{ ...btnGhostStyle, color, opacity: checking || busy ? 0.7 : 1, display: 'inline-flex', alignItems: 'center', justifyContent: 'center', gap: 6, minWidth: 84 }}
// 固定宽度 + 内容居中:图标(check ↔ refresh)与 label("检查更新" ↔ "检查中…")
// 切换时按钮尺寸不再跳动;图标固定容器保证旋转时绕中心转、不位移。
style={{ ...btnGhostStyle, color, opacity: checking || busy ? 0.7 : 1, display: 'inline-flex', alignItems: 'center', justifyContent: 'center', gap: 6, minWidth: 160 }}
>
<Icon
name={iconName}
size={12}
style={checking ? { animation: 'ol-spin 0.8s linear infinite' } : undefined}
/>
<span style={{ display: 'inline-flex', width: 14, height: 14, alignItems: 'center', justifyContent: 'center', flexShrink: 0 }}>
<Icon
name={iconName}
size={12}
style={checking ? { animation: 'ol-spin 0.8s linear infinite' } : undefined}
/>
</span>
<span style={{ whiteSpace: 'nowrap' }}>{label}</span>
</button>
{isDialogStatus(status) && (
+3 -2
View File
@@ -117,9 +117,10 @@ a { color: inherit; text-decoration: none; }
to { opacity: 1; transform: translateY(0); }
}
/* 通用旋转 —— 「检查更新」按钮检查中的转圈动画等。 */
/* 通用旋转 —— 「检查更新」按钮检查中的转圈动画等。
refresh 图标是逆时针(ccw)箭头,旋转方向与其一致,避免视觉上"反着转"。 */
@keyframes ol-spin {
to { transform: rotate(360deg); }
to { transform: rotate(-360deg); }
}
@keyframes ol-modal-drawer-in {