feat: add use clash hook

This commit is contained in:
GyDi
2022-11-23 17:44:40 +08:00
parent 2709d1ff6e
commit 5e626e2cc5
12 changed files with 196 additions and 191 deletions

View File

@@ -43,6 +43,7 @@ export async function getVersion() {
const instance = await getAxios();
return instance.get("/version") as Promise<{
premium: boolean;
meta?: boolean;
version: string;
}>;
}

View File

@@ -5,11 +5,6 @@ export const atomThemeMode = atom<"light" | "dark">({
default: "light",
});
export const atomClashPort = atom<number>({
key: "atomClashPort",
default: 0,
});
export const atomLogData = atom<ILogItem[]>({
key: "atomLogData",
default: [],

View File

@@ -94,8 +94,8 @@ interface IConnections {
type IProfileType = "local" | "remote" | "merge" | "script";
interface IClashInfo {
status: string;
port?: string; // clash mixed port
// status: string;
port?: number; // clash mixed port
server?: string; // external-controller
secret?: string;
}