Explorar el Código

feat: Show proxies count for provider

MystiPanda hace 1 año
padre
commit
5b3dc44c72
Se han modificado 1 ficheros con 14 adiciones y 0 borrados
  1. 14 0
      src/components/proxy/provider-button.tsx

+ 14 - 0
src/components/proxy/provider-button.tsx

@@ -108,6 +108,9 @@ export const ProviderButton = () => {
                         >
                           {key}
                         </Typography>
+                        <TypeBox component="span" sx={{ marginLeft: "8px" }}>
+                          {item.proxies.length}
+                        </TypeBox>
                       </>
                     }
                     secondary={
@@ -158,6 +161,17 @@ export const ProviderButton = () => {
     </>
   );
 };
+const TypeBox = styled(Box)(({ theme }) => ({
+  display: "inline-block",
+  border: "1px solid #ccc",
+  borderColor: alpha(theme.palette.secondary.main, 0.5),
+  color: alpha(theme.palette.secondary.main, 0.8),
+  borderRadius: 4,
+  fontSize: 10,
+  marginRight: "4px",
+  padding: "0 2px",
+  lineHeight: 1.25,
+}));
 
 const StyledTypeBox = styled(Box)(({ theme }) => ({
   display: "inline-block",