chore: adjust files

This commit is contained in:
GyDi 2022-02-13 19:27:06 +08:00
parent 6193a842f4
commit fc48aa7155
18 changed files with 30 additions and 30 deletions

View File

@ -1,4 +1,4 @@
import { ApiType } from "../services/types";
import { ApiType } from "../../services/types";
interface Props {
value: ApiType.ConnectionsItem;

View File

@ -2,12 +2,12 @@ import { useEffect, useState } from "react";
import { useRecoilValue } from "recoil";
import { Box, Typography } from "@mui/material";
import { ArrowDownward, ArrowUpward } from "@mui/icons-material";
import { getInfomation } from "../services/api";
import { ApiType } from "../services/types";
import { atomClashPort } from "../states/setting";
import parseTraffic from "../utils/parse-traffic";
import { getInfomation } from "../../services/api";
import { ApiType } from "../../services/types";
import { atomClashPort } from "../../states/setting";
import parseTraffic from "../../utils/parse-traffic";
const Traffic = () => {
const LayoutTraffic = () => {
const portValue = useRecoilValue(atomClashPort);
const [traffic, setTraffic] = useState({ up: 0, down: 0 });
@ -66,4 +66,4 @@ const Traffic = () => {
);
};
export default Traffic;
export default LayoutTraffic;

View File

@ -1,5 +1,5 @@
import { styled, Box } from "@mui/material";
import { ApiType } from "../services/types";
import { ApiType } from "../../services/types";
const Item = styled(Box)(({ theme }) => ({
padding: "8px 0",

View File

@ -13,10 +13,10 @@ import {
} from "@mui/material";
import { useSWRConfig } from "swr";
import { RefreshRounded } from "@mui/icons-material";
import { CmdType } from "../services/types";
import { updateProfile, deleteProfile, viewProfile } from "../services/cmds";
import Notice from "./notice";
import parseTraffic from "../utils/parse-traffic";
import { CmdType } from "../../services/types";
import { updateProfile, deleteProfile, viewProfile } from "../../services/cmds";
import Notice from "../base/base-notice";
import parseTraffic from "../../utils/parse-traffic";
import relativeTime from "dayjs/plugin/relativeTime";
dayjs.extend(relativeTime);

View File

@ -16,9 +16,9 @@ import {
MyLocationRounded,
NetworkCheckRounded,
} from "@mui/icons-material";
import { updateProxy } from "../services/api";
import { ApiType } from "../services/types";
import { getProfiles, patchProfile } from "../services/cmds";
import { updateProxy } from "../../services/api";
import { ApiType } from "../../services/types";
import { getProfiles, patchProfile } from "../../services/cmds";
import ProxyItem from "./proxy-item";
interface Props {

View File

@ -15,8 +15,8 @@ import { atomClashPort } from "../../states/setting";
import { patchClashConfig } from "../../services/cmds";
import { SettingList, SettingItem } from "./setting";
import { getClashConfig, getVersion, updateConfigs } from "../../services/api";
import Notice from "../base/base-notice";
import GuardState from "./guard-state";
import Notice from "../notice";
interface Props {
onError: (err: Error) => void;

View File

@ -10,10 +10,10 @@ import { getVergeConfig } from "../services/cmds";
import { getAxios } from "../services/api";
import { routers } from "./_routers";
import LogoSvg from "../assets/image/logo.svg";
import Traffic from "../components/traffic";
import LayoutItem from "../components/layout-item";
import UpdateButton from "../components/update-button";
import LayoutControl from "../components/layout-control";
import LayoutItem from "../components/layout/layout-item";
import LayoutControl from "../components/layout/layout-control";
import LayoutTraffic from "../components/layout/layout-traffic";
import UpdateButton from "../components/layout/update-button";
const Layout = () => {
const { mutate } = useSWRConfig();
@ -98,7 +98,7 @@ const Layout = () => {
</List>
<div className="the-traffic" data-windrag>
<Traffic />
<LayoutTraffic />
</div>
</div>

View File

@ -3,8 +3,8 @@ import { Paper } from "@mui/material";
import { Virtuoso } from "react-virtuoso";
import { ApiType } from "../services/types";
import { getInfomation } from "../services/api";
import BasePage from "../components/base-page";
import ConnectionItem from "../components/connection-item";
import BasePage from "../components/base/base-page";
import ConnectionItem from "../components/connection/connection-item";
const ConnectionsPage = () => {
const initConn = { uploadTotal: 0, downloadTotal: 0, connections: [] };

View File

@ -4,8 +4,8 @@ import { Button, Paper } from "@mui/material";
import { Virtuoso } from "react-virtuoso";
import { ApiType } from "../services/types";
import { getInfomation } from "../services/api";
import BasePage from "../components/base-page";
import LogItem from "../components/log-item";
import BasePage from "../components/base/base-page";
import LogItem from "../components/log/log-item";
let logCache: ApiType.LogItem[] = [];

View File

@ -5,9 +5,9 @@ import { Button, ButtonGroup, List, Paper } from "@mui/material";
import { getClashConfig, updateConfigs, updateProxy } from "../services/api";
import { patchClashConfig } from "../services/cmds";
import { getProxies } from "../services/api";
import BasePage from "../components/base-page";
import ProxyItem from "../components/proxy-item";
import ProxyGroup from "../components/proxy-group";
import BasePage from "../components/base/base-page";
import ProxyItem from "../components/proxy/proxy-item";
import ProxyGroup from "../components/proxy/proxy-group";
const ProxyPage = () => {
const { mutate } = useSWRConfig();

View File

@ -1,9 +1,9 @@
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 SettingClash from "../components/setting/setting-clash";
import SettingSystem from "../components/setting/setting-system";
import Notice from "../components/notice";
const SettingPage = () => {
const onError = (error: any) => {