From 1799154bcaf4ae319a3dbb980e83fa21ece3142f Mon Sep 17 00:00:00 2001 From: pompurin404 Date: Sat, 1 Feb 2025 11:37:42 +0800 Subject: [PATCH] add more details to proxy-item --- .../src/components/proxies/proxy-item.tsx | 67 ++++++++++++++++--- src/shared/types.d.ts | 2 + 2 files changed, 61 insertions(+), 8 deletions(-) diff --git a/src/renderer/src/components/proxies/proxy-item.tsx b/src/renderer/src/components/proxies/proxy-item.tsx index 7c8fbe13..2dbb27af 100644 --- a/src/renderer/src/components/proxies/proxy-item.tsx +++ b/src/renderer/src/components/proxies/proxy-item.tsx @@ -53,20 +53,70 @@ const ProxyItem: React.FC = (props) => { isPressable fullWidth shadow="sm" - className={`${fixed ? 'bg-secondary/30' : selected ? 'bg-primary/30' : 'bg-content2'}`} + className={`${ + fixed + ? 'bg-secondary/30 border-r-2 border-r-secondary border-l-2 border-l-secondary' + : selected + ? 'bg-primary/30 border-r-2 border-r-primary border-l-2 border-l-primary' + : 'bg-content2' + }`} radius="sm" > - -
+ + {proxyDisplayMode === 'full' ? ( +
+
+
+ {proxy.name} +
+ {fixed && ( + + )} +
+
+
+
+ {proxy.type} +
+ {['tfo', 'udp', 'xudp', 'mptcp', 'smux'].map(protocol => + proxy[protocol as keyof IMihomoProxy] && ( +
+ {protocol} +
+ ) + )} +
+ +
+
+ ) : ( +
{proxy.name}
- {proxyDisplayMode === 'full' && ( -
- {proxy.type} -
- )}
{fixed && ( @@ -97,6 +147,7 @@ const ProxyItem: React.FC = (props) => {
+ )}
) diff --git a/src/shared/types.d.ts b/src/shared/types.d.ts index 3f80cf7d..e3074897 100644 --- a/src/shared/types.d.ts +++ b/src/shared/types.d.ts @@ -142,6 +142,8 @@ interface IMihomoProxy { type: MihomoProxyType udp: boolean xudp: boolean + mptcp: boolean + smux: boolean } interface IMihomoGroup {