From 4fa19006ad6e19adc3f7714f24c3527ba2180794 Mon Sep 17 00:00:00 2001 From: MystiPanda Date: Wed, 17 Jan 2024 13:32:56 +0800 Subject: [PATCH] feat: Support proxy group icon --- src/components/proxy/proxy-render.tsx | 12 ++++++++++++ src/components/test/test-item.tsx | 12 ++++++++---- src/services/types.d.ts | 1 + 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/components/proxy/proxy-render.tsx b/src/components/proxy/proxy-render.tsx index a987abc7..d8b865d5 100644 --- a/src/components/proxy/proxy-render.tsx +++ b/src/components/proxy/proxy-render.tsx @@ -37,6 +37,18 @@ export const ProxyRender = (props: RenderProps) => { dense onClick={() => onHeadState(group.name, { open: !headState?.open })} > + {group.icon && group.icon.trim().startsWith("http") && ( + + )} + {group.icon && group.icon.trim().startsWith("data") && ( + + )} + {group.icon && group.icon.trim().startsWith(" + )} { {...attributes} {...listeners} > - {icon ? ( + {icon && icon.trim() !== "" ? ( - {icon?.trim().startsWith("http") ? ( - - ) : ( + {icon.trim().startsWith("http") && ( + + )} + {icon.trim().startsWith("data") && ( + + )} + {icon.trim().startsWith("