refactor(site): simplify proxy menu (#10496)

This commit is contained in:
Bruno Quaresma 2023-11-02 16:39:46 -03:00 committed by GitHub
parent ae20df4229
commit e756baa0c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 6 deletions

View File

@ -304,9 +304,9 @@ const ProxyMenu: FC<{ proxyContextValue: ProxyContextValue }> = ({
if (isLoading) {
return (
<Skeleton
width="160px"
width="110px"
height={BUTTON_SM_HEIGHT}
sx={{ borderRadius: "4px", transform: "none" }}
sx={{ borderRadius: "9999px", transform: "none" }}
/>
);
}
@ -319,13 +319,13 @@ const ProxyMenu: FC<{ proxyContextValue: ProxyContextValue }> = ({
size="small"
endIcon={<KeyboardArrowDownOutlined />}
sx={{
borderRadius: "4px",
borderRadius: "999px",
"& .MuiSvgIcon-root": { fontSize: 14 },
}}
>
{selectedProxy ? (
<Box display="flex" gap={2} alignItems="center">
<Box width={14} height={14} lineHeight={0}>
<Box display="flex" gap={1} alignItems="center">
<Box width={16} height={16} lineHeight={0}>
<Box
component="img"
src={selectedProxy.icon_url}
@ -335,7 +335,6 @@ const ProxyMenu: FC<{ proxyContextValue: ProxyContextValue }> = ({
height="100%"
/>
</Box>
{selectedProxy.display_name}
<ProxyStatusLatency
latency={latencies?.[selectedProxy.id]?.latencyMS}
isLoading={proxyLatencyLoading(selectedProxy)}