Skip to content

Commit

Permalink
chore: adjust files
Browse files Browse the repository at this point in the history
  • Loading branch information
zzzgydi committed Feb 13, 2022
1 parent 6193a84 commit fc48aa7
Show file tree
Hide file tree
Showing 18 changed files with 30 additions and 30 deletions.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ApiType } from "../services/types";
import { ApiType } from "../../services/types";

interface Props {
value: ApiType.ConnectionsItem;
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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 });

Expand Down Expand Up @@ -66,4 +66,4 @@ const Traffic = () => {
);
};

export default Traffic;
export default LayoutTraffic;
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/components/setting/setting-clash.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
10 changes: 5 additions & 5 deletions src/pages/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -98,7 +98,7 @@ const Layout = () => {
</List>

<div className="the-traffic" data-windrag>
<Traffic />
<LayoutTraffic />
</div>
</div>

Expand Down
4 changes: 2 additions & 2 deletions src/pages/connections.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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: [] };
Expand Down
4 changes: 2 additions & 2 deletions src/pages/logs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = [];

Expand Down
6 changes: 3 additions & 3 deletions src/pages/proxies.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions src/pages/settings.tsx
Original file line number Diff line number Diff line change
@@ -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) => {
Expand Down

0 comments on commit fc48aa7

Please sign in to comment.