chore: merge
feat: remove outdated config
This commit is contained in:
commit
ad65a278d4
5 changed files with 9 additions and 11 deletions
|
@ -32,13 +32,11 @@
|
||||||
"shortDescription": "A Clash GUI based on tauri.",
|
"shortDescription": "A Clash GUI based on tauri.",
|
||||||
"longDescription": "A Clash GUI based on tauri.",
|
"longDescription": "A Clash GUI based on tauri.",
|
||||||
"deb": {
|
"deb": {
|
||||||
"depends": [],
|
"depends": []
|
||||||
"useBootstrapper": false
|
|
||||||
},
|
},
|
||||||
"macOS": {
|
"macOS": {
|
||||||
"frameworks": [],
|
"frameworks": [],
|
||||||
"minimumSystemVersion": "",
|
"minimumSystemVersion": "",
|
||||||
"useBootstrapper": false,
|
|
||||||
"exceptionDomain": "",
|
"exceptionDomain": "",
|
||||||
"signingIdentity": null,
|
"signingIdentity": null,
|
||||||
"entitlements": null
|
"entitlements": null
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { Box, Typography } from "@mui/material";
|
||||||
import { ArrowDownward, ArrowUpward } from "@mui/icons-material";
|
import { ArrowDownward, ArrowUpward } from "@mui/icons-material";
|
||||||
import { listen } from "@tauri-apps/api/event";
|
import { listen } from "@tauri-apps/api/event";
|
||||||
import { ApiType } from "../../services/types";
|
import { ApiType } from "../../services/types";
|
||||||
import { getInfomation } from "../../services/api";
|
import { getInformation } from "../../services/api";
|
||||||
import { getVergeConfig } from "../../services/cmds";
|
import { getVergeConfig } from "../../services/cmds";
|
||||||
import { atomClashPort } from "../../services/states";
|
import { atomClashPort } from "../../services/states";
|
||||||
import TrafficGraph from "./traffic-graph";
|
import TrafficGraph from "./traffic-graph";
|
||||||
|
@ -41,7 +41,7 @@ const LayoutTraffic = () => {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
let ws: WebSocket | null = null;
|
let ws: WebSocket | null = null;
|
||||||
|
|
||||||
getInfomation().then((result) => {
|
getInformation().then((result) => {
|
||||||
const { server = "", secret = "" } = result;
|
const { server = "", secret = "" } = result;
|
||||||
ws = new WebSocket(`ws://${server}/traffic?token=${secret}`);
|
ws = new WebSocket(`ws://${server}/traffic?token=${secret}`);
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { useEffect, useState } from "react";
|
||||||
import { useSetRecoilState } from "recoil";
|
import { useSetRecoilState } from "recoil";
|
||||||
import { listen } from "@tauri-apps/api/event";
|
import { listen } from "@tauri-apps/api/event";
|
||||||
import { ApiType } from "../../services/types";
|
import { ApiType } from "../../services/types";
|
||||||
import { getInfomation } from "../../services/api";
|
import { getInformation } from "../../services/api";
|
||||||
import { atomLogData } from "../../services/states";
|
import { atomLogData } from "../../services/states";
|
||||||
|
|
||||||
const MAX_LOG_NUM = 1000;
|
const MAX_LOG_NUM = 1000;
|
||||||
|
@ -25,7 +25,7 @@ export default function useLogSetup() {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
getInfomation().then((info) => {
|
getInformation().then((info) => {
|
||||||
const { server = "", secret = "" } = info;
|
const { server = "", secret = "" } = info;
|
||||||
ws = new WebSocket(`ws://${server}/logs?token=${secret}`);
|
ws = new WebSocket(`ws://${server}/logs?token=${secret}`);
|
||||||
ws.addEventListener("message", handler);
|
ws.addEventListener("message", handler);
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { Box, Button, Paper, TextField } from "@mui/material";
|
||||||
import { Virtuoso } from "react-virtuoso";
|
import { Virtuoso } from "react-virtuoso";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { ApiType } from "../services/types";
|
import { ApiType } from "../services/types";
|
||||||
import { closeAllConnections, getInfomation } from "../services/api";
|
import { closeAllConnections, getInformation } from "../services/api";
|
||||||
import BasePage from "../components/base/base-page";
|
import BasePage from "../components/base/base-page";
|
||||||
import ConnectionItem from "../components/connection/connection-item";
|
import ConnectionItem from "../components/connection/connection-item";
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ const ConnectionsPage = () => {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
let ws: WebSocket | null = null;
|
let ws: WebSocket | null = null;
|
||||||
|
|
||||||
getInfomation().then((result) => {
|
getInformation().then((result) => {
|
||||||
const { server = "", secret = "" } = result;
|
const { server = "", secret = "" } = result;
|
||||||
ws = new WebSocket(`ws://${server}/connections?token=${secret}`);
|
ws = new WebSocket(`ws://${server}/connections?token=${secret}`);
|
||||||
|
|
||||||
|
|
|
@ -32,8 +32,8 @@ export async function getAxios(force: boolean = false) {
|
||||||
return axiosIns;
|
return axiosIns;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// get infomation
|
/// get information
|
||||||
export async function getInfomation() {
|
export async function getInformation() {
|
||||||
if (server) return { server, secret };
|
if (server) return { server, secret };
|
||||||
const info = await getClashInfo();
|
const info = await getClashInfo();
|
||||||
return info!;
|
return info!;
|
||||||
|
|
Loading…
Add table
Reference in a new issue