fix(ui): unify delay color handling in ProxyItem and TestItem components #6829

This commit is contained in:
Tunglies
2026-04-17 21:29:35 +08:00
parent 4718c80498
commit 0e6d1d2476
3 changed files with 11 additions and 11 deletions
+5 -5
View File
@@ -248,12 +248,12 @@ export const ProxyItemMini = (props: Props) => {
e.stopPropagation()
onDelay()
}}
color={delayManager.formatDelayColor(delayValue, timeout)}
sx={({ palette }) =>
!proxy.provider
sx={({ palette }) => ({
color: delayManager.formatDelayColor(delayValue, timeout),
...(!proxy.provider
? { ':hover': { bgcolor: alpha(palette.primary.main, 0.15) } }
: {}
}
: {}),
})}
>
{delayManager.formatDelay(delayValue, timeout)}
</Widget>
+5 -5
View File
@@ -214,12 +214,12 @@ export const ProxyItem = (props: Props) => {
e.stopPropagation()
onDelay()
}}
color={delayManager.formatDelayColor(delayValue, timeout)}
sx={({ palette }) =>
!proxy.provider
sx={({ palette }) => ({
color: delayManager.formatDelayColor(delayValue, timeout),
...(!proxy.provider
? { ':hover': { bgcolor: alpha(palette.primary.main, 0.15) } }
: {}
}
: {}),
})}
>
{delayManager.formatDelay(delayValue, timeout)}
</Widget>
+1 -1
View File
@@ -187,8 +187,8 @@ export const TestItem = ({
e.stopPropagation()
onDelay()
}}
color={delayManager.formatDelayColor(delay)}
sx={({ palette }) => ({
color: delayManager.formatDelayColor(delay),
':hover': {
bgcolor: alpha(palette.primary.main, 0.15),
},