From c69978c9fd84e933fe8e059673e8915643259b64 Mon Sep 17 00:00:00 2001 From: MystiPanda Date: Sun, 10 Mar 2024 00:22:22 +0800 Subject: [PATCH] fix: fontSize and some styles --- src/components/proxy/proxy-item-mini.tsx | 25 ++++-------------------- src/components/proxy/proxy-item.tsx | 8 ++------ 2 files changed, 6 insertions(+), 27 deletions(-) diff --git a/src/components/proxy/proxy-item-mini.tsx b/src/components/proxy/proxy-item-mini.tsx index c4bba35c..a5137c3c 100644 --- a/src/components/proxy/proxy-item-mini.tsx +++ b/src/components/proxy/proxy-item-mini.tsx @@ -66,19 +66,15 @@ export const ProxyItemMini = (props: Props) => { "&:hover .the-check": { display: !showDelay ? "block" : "none" }, "&:hover .the-delay": { display: showDelay ? "block" : "none" }, "&:hover .the-icon": { display: "none" }, - "&:hover ": { + "&.Mui-selected": { + width: `calc(100% + 3px)`, + marginLeft: `-3px`, + borderLeft: `3px solid ${selectColor}`, bgcolor: mode === "light" ? alpha(primary.main, 0.15) : alpha(primary.main, 0.35), }, - "&.Mui-selected": { - width: `calc(100% + 3px)`, - marginLeft: `-3px`, - borderLeft: `3px solid ${selectColor}`, - bgcolor, - }, - // "&.Mui-selected .MuiListItemText-secondary": { color }, backgroundColor: bgcolor, }; }, @@ -95,8 +91,6 @@ export const ProxyItemMini = (props: Props) => { wordBreak: "break-all", overflow: "hidden", whiteSpace: "nowrap", - fontSize: "13px", - fontWeight: "700", }} > {proxy.name} @@ -122,8 +116,6 @@ export const ProxyItemMini = (props: Props) => { wordBreak: "break-all", overflow: "hidden", whiteSpace: "nowrap", - fontSize: "11px", - fontWeight: "700", marginRight: "8px", }} > @@ -219,12 +211,3 @@ const TypeBox = styled(Box)(({ theme: { palette, typography } }) => ({ padding: "0 4px", lineHeight: 1.5, })); - -const TypeTypo = styled(Box)(({ theme: { palette, typography } }) => ({ - display: "inline-block", - fontSize: 10, - fontFamily: typography.fontFamily, - marginRight: "4px", - padding: "0 2px", - lineHeight: 1.25, -})); diff --git a/src/components/proxy/proxy-item.tsx b/src/components/proxy/proxy-item.tsx index ff73f72e..f9d59962 100644 --- a/src/components/proxy/proxy-item.tsx +++ b/src/components/proxy/proxy-item.tsx @@ -87,17 +87,13 @@ export const ProxyItem = (props: Props) => { "&:hover .the-check": { display: !showDelay ? "block" : "none" }, "&:hover .the-delay": { display: showDelay ? "block" : "none" }, "&:hover .the-icon": { display: "none" }, - "&:hover ": { + "&.Mui-selected": { + borderLeft: `3px solid ${selectColor}`, bgcolor: mode === "light" ? alpha(primary.main, 0.15) : alpha(primary.main, 0.35), }, - "&.Mui-selected": { - borderLeft: `3px solid ${selectColor}`, - bgcolor, - }, - // "&.Mui-selected .MuiListItemText-secondary": { bgcolor }, backgroundColor: bgcolor, marginBottom: "8px", height: "40px",