From 8619bd5be3c240fff33598afe43b21b70c980385 Mon Sep 17 00:00:00 2001 From: MystiPanda Date: Sat, 24 Feb 2024 13:09:53 +0800 Subject: [PATCH] feat: Show current proxy for group node #444 --- src/components/proxy/proxy-item-mini.tsx | 37 +++++++++++++++++++++++- src/components/proxy/proxy-item.tsx | 4 ++- 2 files changed, 39 insertions(+), 2 deletions(-) diff --git a/src/components/proxy/proxy-item-mini.tsx b/src/components/proxy/proxy-item-mini.tsx index 6f7e5e18..3ff40138 100644 --- a/src/components/proxy/proxy-item-mini.tsx +++ b/src/components/proxy/proxy-item-mini.tsx @@ -95,7 +95,32 @@ export const ProxyItemMini = (props: Props) => { {showType && ( - + + {proxy.now && ( + + {proxy.now} + + )} {!!proxy.provider && ( {proxy.provider} )} @@ -181,6 +206,16 @@ const TypeBox = styled(Box)(({ theme: { palette, typography } }) => ({ fontSize: 10, fontFamily: typography.fontFamily, marginRight: "4px", + marginTop: "auto", + padding: "0 2px", + lineHeight: 1.25, +})); + +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 48609174..b96635f1 100644 --- a/src/components/proxy/proxy-item.tsx +++ b/src/components/proxy/proxy-item.tsx @@ -100,7 +100,9 @@ export const ProxyItem = (props: Props) => { secondary={ <> {proxy.name} - + {showType && proxy.now && ( + {proxy.now} + )} {showType && !!proxy.provider && ( {proxy.provider} )}