chore: hint for canceling fixed #840

This commit is contained in:
dongchengjie
2024-05-17 20:44:18 +08:00
parent 4f740acabd
commit 39aa1fa2a4
5 changed files with 13 additions and 3 deletions

View File

@@ -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>
)}