From bfe4f08232ab1bbfefef9d19c9eaf74a4d70c80f Mon Sep 17 00:00:00 2001
From: GyDi <zzzgydi@gmail.com>
Date: Wed, 14 Dec 2022 15:59:41 +0800
Subject: [PATCH] fix: adjust rule ui

---
 src/components/rule/rule-item.tsx | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/components/rule/rule-item.tsx b/src/components/rule/rule-item.tsx
index 3c5de09..3bf2291 100644
--- a/src/components/rule/rule-item.tsx
+++ b/src/components/rule/rule-item.tsx
@@ -9,11 +9,9 @@ const Item = styled(Box)(({ theme }) => ({
 const COLOR = [
   "primary",
   "secondary",
-  "info",
-  "warning",
-  "error",
-  "success",
-  "text",
+  "info.main",
+  "warning.main",
+  "success.main",
 ];
 
 interface Props {
@@ -22,6 +20,9 @@ interface Props {
 }
 
 const parseColor = (text: string) => {
+  if (text === "REJECT") return "error.main";
+  if (text === "DIRECT") return "text.primary";
+
   let sum = 0;
   for (let i = 0; i < text.length; i++) {
     sum += text.charCodeAt(i);
@@ -42,7 +43,7 @@ const RuleItem = (props: Props) => {
         {index}
       </Typography>
 
-      <Box>
+      <Box sx={{ userSelect: "text" }}>
         <Typography component="h6" variant="subtitle1" color="text.primary">
           {value.payload || "-"}
         </Typography>
-- 
GitLab