|
@@ -2,7 +2,7 @@ import useSWR from "swr";
|
|
import { useEffect, useMemo } from "react";
|
|
import { useEffect, useMemo } from "react";
|
|
import { useLockFn } from "ahooks";
|
|
import { useLockFn } from "ahooks";
|
|
import { useTranslation } from "react-i18next";
|
|
import { useTranslation } from "react-i18next";
|
|
-import { Button, ButtonGroup, Paper } from "@mui/material";
|
|
|
|
|
|
+import { Box, Button, ButtonGroup, Paper } from "@mui/material";
|
|
import {
|
|
import {
|
|
closeAllConnections,
|
|
closeAllConnections,
|
|
getClashConfig,
|
|
getClashConfig,
|
|
@@ -12,6 +12,7 @@ import { patchClashConfig } from "@/services/cmds";
|
|
import { useVerge } from "@/hooks/use-verge";
|
|
import { useVerge } from "@/hooks/use-verge";
|
|
import { BasePage } from "@/components/base";
|
|
import { BasePage } from "@/components/base";
|
|
import { ProxyGroups } from "@/components/proxy/proxy-groups";
|
|
import { ProxyGroups } from "@/components/proxy/proxy-groups";
|
|
|
|
+import { ProviderButton } from "@/components/proxy/provider-button";
|
|
|
|
|
|
const ProxyPage = () => {
|
|
const ProxyPage = () => {
|
|
const { t } = useTranslation();
|
|
const { t } = useTranslation();
|
|
@@ -53,18 +54,22 @@ const ProxyPage = () => {
|
|
contentStyle={{ height: "100%" }}
|
|
contentStyle={{ height: "100%" }}
|
|
title={t("Proxy Groups")}
|
|
title={t("Proxy Groups")}
|
|
header={
|
|
header={
|
|
- <ButtonGroup size="small">
|
|
|
|
- {modeList.map((mode) => (
|
|
|
|
- <Button
|
|
|
|
- key={mode}
|
|
|
|
- variant={mode === curMode ? "contained" : "outlined"}
|
|
|
|
- onClick={() => onChangeMode(mode)}
|
|
|
|
- sx={{ textTransform: "capitalize" }}
|
|
|
|
- >
|
|
|
|
- {t(mode)}
|
|
|
|
- </Button>
|
|
|
|
- ))}
|
|
|
|
- </ButtonGroup>
|
|
|
|
|
|
+ <Box display="flex" alignItems="center" gap={1}>
|
|
|
|
+ <ProviderButton />
|
|
|
|
+
|
|
|
|
+ <ButtonGroup size="small">
|
|
|
|
+ {modeList.map((mode) => (
|
|
|
|
+ <Button
|
|
|
|
+ key={mode}
|
|
|
|
+ variant={mode === curMode ? "contained" : "outlined"}
|
|
|
|
+ onClick={() => onChangeMode(mode)}
|
|
|
|
+ sx={{ textTransform: "capitalize" }}
|
|
|
|
+ >
|
|
|
|
+ {t(mode)}
|
|
|
|
+ </Button>
|
|
|
|
+ ))}
|
|
|
|
+ </ButtonGroup>
|
|
|
|
+ </Box>
|
|
}
|
|
}
|
|
>
|
|
>
|
|
<Paper
|
|
<Paper
|