feat: add use clash hook
This commit is contained in:
@@ -43,6 +43,7 @@ export async function getVersion() {
|
||||
const instance = await getAxios();
|
||||
return instance.get("/version") as Promise<{
|
||||
premium: boolean;
|
||||
meta?: boolean;
|
||||
version: string;
|
||||
}>;
|
||||
}
|
||||
|
||||
@@ -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: [],
|
||||
|
||||
4
src/services/types.d.ts
vendored
4
src/services/types.d.ts
vendored
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user