Ver código fonte

chore: hint for canceling `fixed` #840

dongchengjie 1 ano atrás
pai
commit
bd3b41c809

+ 9 - 2
src/components/proxy/proxy-item-mini.tsx

@@ -5,6 +5,7 @@ import { alpha, Box, ListItemButton, styled, Typography } from "@mui/material";
 import { BaseLoading } from "@/components/base";
 import delayManager from "@/services/delay";
 import { useVerge } from "@/hooks/use-verge";
+import { useTranslation } from "react-i18next";
 
 interface Props {
   group: IProxyGroupItem;
@@ -18,6 +19,8 @@ interface Props {
 export const ProxyItemMini = (props: Props) => {
   const { group, proxy, selected, showType = true, onClick } = props;
 
+  const { t } = useTranslation();
+
   // -1/<=0 为 不显示
   // -2 为 loading
   const [delay, setDelay] = useState(-1);
@@ -209,10 +212,14 @@ export const ProxyItemMini = (props: Props) => {
           />
         )}
       </Box>
-
       {group.fixed && group.fixed === proxy.name && (
         // 展示fixed状态
-        <span className={proxy.name === group.now ? "the-pin" : "the-unpin"}>
+        <span
+          className={proxy.name === group.now ? "the-pin" : "the-unpin"}
+          title={
+            group.type === "URLTest" ? t("Delay check to cancel fixed") : ""
+          }
+        >
           📌
         </span>
       )}

+ 1 - 1
src/components/setting/setting-verge.tsx

@@ -93,7 +93,7 @@ const SettingVerge = ({ onError }: Props) => {
           onChange={(e) => onChangeData({ language: e })}
           onGuard={(e) => patchVerge({ language: e })}
         >
-          <Select size="small" sx={{ width: 100, "> div": { py: "7.5px" } }}>
+          <Select size="small" sx={{ width: 110, "> div": { py: "7.5px" } }}>
             <MenuItem value="zh">中文</MenuItem>
             <MenuItem value="en">English</MenuItem>
             <MenuItem value="ru">Русский</MenuItem>

+ 1 - 0
src/locales/en.json

@@ -60,6 +60,7 @@
   "Sort by delay": "Sort by delay",
   "Sort by name": "Sort by name",
   "Delay check URL": "Delay check URL",
+  "Delay check to cancel fixed": "Delay check to cancel fixed",
   "Proxy basic": "Proxy basic",
   "Proxy detail": "Proxy detail",
   "Filter": "Filter",

+ 1 - 0
src/locales/ru.json

@@ -60,6 +60,7 @@
   "Sort by delay": "Сортировать по задержке",
   "Sort by name": "Сортировать по названию",
   "Delay check URL": "URL проверки задержки",
+  "Delay check to cancel fixed": "Проверка задержки для отмены фиксированного",
   "Proxy basic": "Резюме о прокси",
   "Proxy detail": "Подробности о прокси",
   "Filter": "Фильтр",

+ 1 - 0
src/locales/zh.json

@@ -60,6 +60,7 @@
   "Sort by delay": "按延迟排序",
   "Sort by name": "按名称排序",
   "Delay check URL": "延迟测试链接",
+  "Delay check to cancel fixed": "进行延迟测试,以取消固定",
   "Proxy basic": "隐藏节点细节",
   "Proxy detail": "展示节点细节",
   "Filter": "过滤节点",