chore: adjust files
This commit is contained in:
parent
6193a842f4
commit
fc48aa7155
@ -1,4 +1,4 @@
|
|||||||
import { ApiType } from "../services/types";
|
import { ApiType } from "../../services/types";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
value: ApiType.ConnectionsItem;
|
value: ApiType.ConnectionsItem;
|
@ -2,12 +2,12 @@ import { useEffect, useState } from "react";
|
|||||||
import { useRecoilValue } from "recoil";
|
import { useRecoilValue } from "recoil";
|
||||||
import { Box, Typography } from "@mui/material";
|
import { Box, Typography } from "@mui/material";
|
||||||
import { ArrowDownward, ArrowUpward } from "@mui/icons-material";
|
import { ArrowDownward, ArrowUpward } from "@mui/icons-material";
|
||||||
import { getInfomation } from "../services/api";
|
import { getInfomation } from "../../services/api";
|
||||||
import { ApiType } from "../services/types";
|
import { ApiType } from "../../services/types";
|
||||||
import { atomClashPort } from "../states/setting";
|
import { atomClashPort } from "../../states/setting";
|
||||||
import parseTraffic from "../utils/parse-traffic";
|
import parseTraffic from "../../utils/parse-traffic";
|
||||||
|
|
||||||
const Traffic = () => {
|
const LayoutTraffic = () => {
|
||||||
const portValue = useRecoilValue(atomClashPort);
|
const portValue = useRecoilValue(atomClashPort);
|
||||||
const [traffic, setTraffic] = useState({ up: 0, down: 0 });
|
const [traffic, setTraffic] = useState({ up: 0, down: 0 });
|
||||||
|
|
||||||
@ -66,4 +66,4 @@ const Traffic = () => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Traffic;
|
export default LayoutTraffic;
|
@ -1,5 +1,5 @@
|
|||||||
import { styled, Box } from "@mui/material";
|
import { styled, Box } from "@mui/material";
|
||||||
import { ApiType } from "../services/types";
|
import { ApiType } from "../../services/types";
|
||||||
|
|
||||||
const Item = styled(Box)(({ theme }) => ({
|
const Item = styled(Box)(({ theme }) => ({
|
||||||
padding: "8px 0",
|
padding: "8px 0",
|
@ -13,10 +13,10 @@ import {
|
|||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
import { useSWRConfig } from "swr";
|
import { useSWRConfig } from "swr";
|
||||||
import { RefreshRounded } from "@mui/icons-material";
|
import { RefreshRounded } from "@mui/icons-material";
|
||||||
import { CmdType } from "../services/types";
|
import { CmdType } from "../../services/types";
|
||||||
import { updateProfile, deleteProfile, viewProfile } from "../services/cmds";
|
import { updateProfile, deleteProfile, viewProfile } from "../../services/cmds";
|
||||||
import Notice from "./notice";
|
import Notice from "../base/base-notice";
|
||||||
import parseTraffic from "../utils/parse-traffic";
|
import parseTraffic from "../../utils/parse-traffic";
|
||||||
import relativeTime from "dayjs/plugin/relativeTime";
|
import relativeTime from "dayjs/plugin/relativeTime";
|
||||||
|
|
||||||
dayjs.extend(relativeTime);
|
dayjs.extend(relativeTime);
|
@ -16,9 +16,9 @@ import {
|
|||||||
MyLocationRounded,
|
MyLocationRounded,
|
||||||
NetworkCheckRounded,
|
NetworkCheckRounded,
|
||||||
} from "@mui/icons-material";
|
} from "@mui/icons-material";
|
||||||
import { updateProxy } from "../services/api";
|
import { updateProxy } from "../../services/api";
|
||||||
import { ApiType } from "../services/types";
|
import { ApiType } from "../../services/types";
|
||||||
import { getProfiles, patchProfile } from "../services/cmds";
|
import { getProfiles, patchProfile } from "../../services/cmds";
|
||||||
import ProxyItem from "./proxy-item";
|
import ProxyItem from "./proxy-item";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
@ -15,8 +15,8 @@ import { atomClashPort } from "../../states/setting";
|
|||||||
import { patchClashConfig } from "../../services/cmds";
|
import { patchClashConfig } from "../../services/cmds";
|
||||||
import { SettingList, SettingItem } from "./setting";
|
import { SettingList, SettingItem } from "./setting";
|
||||||
import { getClashConfig, getVersion, updateConfigs } from "../../services/api";
|
import { getClashConfig, getVersion, updateConfigs } from "../../services/api";
|
||||||
|
import Notice from "../base/base-notice";
|
||||||
import GuardState from "./guard-state";
|
import GuardState from "./guard-state";
|
||||||
import Notice from "../notice";
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
onError: (err: Error) => void;
|
onError: (err: Error) => void;
|
||||||
|
@ -10,10 +10,10 @@ import { getVergeConfig } from "../services/cmds";
|
|||||||
import { getAxios } from "../services/api";
|
import { getAxios } from "../services/api";
|
||||||
import { routers } from "./_routers";
|
import { routers } from "./_routers";
|
||||||
import LogoSvg from "../assets/image/logo.svg";
|
import LogoSvg from "../assets/image/logo.svg";
|
||||||
import Traffic from "../components/traffic";
|
import LayoutItem from "../components/layout/layout-item";
|
||||||
import LayoutItem from "../components/layout-item";
|
import LayoutControl from "../components/layout/layout-control";
|
||||||
import UpdateButton from "../components/update-button";
|
import LayoutTraffic from "../components/layout/layout-traffic";
|
||||||
import LayoutControl from "../components/layout-control";
|
import UpdateButton from "../components/layout/update-button";
|
||||||
|
|
||||||
const Layout = () => {
|
const Layout = () => {
|
||||||
const { mutate } = useSWRConfig();
|
const { mutate } = useSWRConfig();
|
||||||
@ -98,7 +98,7 @@ const Layout = () => {
|
|||||||
</List>
|
</List>
|
||||||
|
|
||||||
<div className="the-traffic" data-windrag>
|
<div className="the-traffic" data-windrag>
|
||||||
<Traffic />
|
<LayoutTraffic />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -3,8 +3,8 @@ import { Paper } from "@mui/material";
|
|||||||
import { Virtuoso } from "react-virtuoso";
|
import { Virtuoso } from "react-virtuoso";
|
||||||
import { ApiType } from "../services/types";
|
import { ApiType } from "../services/types";
|
||||||
import { getInfomation } from "../services/api";
|
import { getInfomation } from "../services/api";
|
||||||
import BasePage from "../components/base-page";
|
import BasePage from "../components/base/base-page";
|
||||||
import ConnectionItem from "../components/connection-item";
|
import ConnectionItem from "../components/connection/connection-item";
|
||||||
|
|
||||||
const ConnectionsPage = () => {
|
const ConnectionsPage = () => {
|
||||||
const initConn = { uploadTotal: 0, downloadTotal: 0, connections: [] };
|
const initConn = { uploadTotal: 0, downloadTotal: 0, connections: [] };
|
||||||
|
@ -4,8 +4,8 @@ import { Button, Paper } from "@mui/material";
|
|||||||
import { Virtuoso } from "react-virtuoso";
|
import { Virtuoso } from "react-virtuoso";
|
||||||
import { ApiType } from "../services/types";
|
import { ApiType } from "../services/types";
|
||||||
import { getInfomation } from "../services/api";
|
import { getInfomation } from "../services/api";
|
||||||
import BasePage from "../components/base-page";
|
import BasePage from "../components/base/base-page";
|
||||||
import LogItem from "../components/log-item";
|
import LogItem from "../components/log/log-item";
|
||||||
|
|
||||||
let logCache: ApiType.LogItem[] = [];
|
let logCache: ApiType.LogItem[] = [];
|
||||||
|
|
||||||
|
@ -5,9 +5,9 @@ import { Button, ButtonGroup, List, Paper } from "@mui/material";
|
|||||||
import { getClashConfig, updateConfigs, updateProxy } from "../services/api";
|
import { getClashConfig, updateConfigs, updateProxy } from "../services/api";
|
||||||
import { patchClashConfig } from "../services/cmds";
|
import { patchClashConfig } from "../services/cmds";
|
||||||
import { getProxies } from "../services/api";
|
import { getProxies } from "../services/api";
|
||||||
import BasePage from "../components/base-page";
|
import BasePage from "../components/base/base-page";
|
||||||
import ProxyItem from "../components/proxy-item";
|
import ProxyItem from "../components/proxy/proxy-item";
|
||||||
import ProxyGroup from "../components/proxy-group";
|
import ProxyGroup from "../components/proxy/proxy-group";
|
||||||
|
|
||||||
const ProxyPage = () => {
|
const ProxyPage = () => {
|
||||||
const { mutate } = useSWRConfig();
|
const { mutate } = useSWRConfig();
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import { Paper } from "@mui/material";
|
import { Paper } from "@mui/material";
|
||||||
import BasePage from "../components/base-page";
|
import Notice from "../components/base/base-notice";
|
||||||
|
import BasePage from "../components/base/base-page";
|
||||||
import SettingVerge from "../components/setting/setting-verge";
|
import SettingVerge from "../components/setting/setting-verge";
|
||||||
import SettingClash from "../components/setting/setting-clash";
|
import SettingClash from "../components/setting/setting-clash";
|
||||||
import SettingSystem from "../components/setting/setting-system";
|
import SettingSystem from "../components/setting/setting-system";
|
||||||
import Notice from "../components/notice";
|
|
||||||
|
|
||||||
const SettingPage = () => {
|
const SettingPage = () => {
|
||||||
const onError = (error: any) => {
|
const onError = (error: any) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user