From f032228d0eea1fdb2acb5a5eb71a2178f2f06045 Mon Sep 17 00:00:00 2001
From: GyDi <zzzgydi@gmail.com>
Date: Thu, 29 Jun 2023 14:21:14 +0800
Subject: [PATCH] fix: font family not works in some interfaces, close #639

---
 src/components/log/log-item.tsx          |  3 ++-
 src/components/proxy/proxy-item-mini.tsx | 10 ++++++----
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/components/log/log-item.tsx b/src/components/log/log-item.tsx
index dfb15e6..1aa0804 100644
--- a/src/components/log/log-item.tsx
+++ b/src/components/log/log-item.tsx
@@ -1,11 +1,12 @@
 import { styled, Box } from "@mui/material";
 
-const Item = styled(Box)(({ theme: { palette } }) => ({
+const Item = styled(Box)(({ theme: { palette, typography } }) => ({
   padding: "8px 0",
   margin: "0 12px",
   lineHeight: 1.35,
   borderBottom: `1px solid ${palette.divider}`,
   fontSize: "0.875rem",
+  fontFamily: typography.fontFamily,
   userSelect: "text",
   "& .time": {
     color: palette.text.secondary,
diff --git a/src/components/proxy/proxy-item-mini.tsx b/src/components/proxy/proxy-item-mini.tsx
index fe3f499..aaf5ab1 100644
--- a/src/components/proxy/proxy-item-mini.tsx
+++ b/src/components/proxy/proxy-item-mini.tsx
@@ -166,19 +166,21 @@ export const ProxyItemMini = (props: Props) => {
   );
 };
 
-const Widget = styled(Box)(() => ({
+const Widget = styled(Box)(({ theme: { typography } }) => ({
   padding: "3px 6px",
   fontSize: 14,
+  fontFamily: typography.fontFamily,
   borderRadius: "4px",
 }));
 
-const TypeBox = styled(Box)(({ theme }) => ({
+const TypeBox = styled(Box)(({ theme: { palette, typography } }) => ({
   display: "inline-block",
   border: "1px solid #ccc",
-  borderColor: alpha(theme.palette.text.secondary, 0.36),
-  color: alpha(theme.palette.text.secondary, 0.42),
+  borderColor: alpha(palette.text.secondary, 0.36),
+  color: alpha(palette.text.secondary, 0.42),
   borderRadius: 4,
   fontSize: 10,
+  fontFamily: typography.fontFamily,
   marginRight: "4px",
   padding: "0 2px",
   lineHeight: 1.25,
-- 
GitLab