Skip to content

Commit

Permalink
chore: hint for canceling fixed #840
Browse files Browse the repository at this point in the history
  • Loading branch information
dongchengjie committed May 17, 2024
1 parent 31d3010 commit bd3b41c
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
11 changes: 9 additions & 2 deletions src/components/proxy/proxy-item-mini.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down Expand Up @@ -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>
)}
Expand Down
2 changes: 1 addition & 1 deletion src/components/setting/setting-verge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions src/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"Sort by delay": "Сортировать по задержке",
"Sort by name": "Сортировать по названию",
"Delay check URL": "URL проверки задержки",
"Delay check to cancel fixed": "Проверка задержки для отмены фиксированного",
"Proxy basic": "Резюме о прокси",
"Proxy detail": "Подробности о прокси",
"Filter": "Фильтр",
Expand Down
1 change: 1 addition & 0 deletions src/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"Sort by delay": "按延迟排序",
"Sort by name": "按名称排序",
"Delay check URL": "延迟测试链接",
"Delay check to cancel fixed": "进行延迟测试,以取消固定",
"Proxy basic": "隐藏节点细节",
"Proxy detail": "展示节点细节",
"Filter": "过滤节点",
Expand Down

0 comments on commit bd3b41c

Please sign in to comment.