mirror of
https://github.com/clash-verge-rev/clash-verge-rev
synced 2025-05-06 21:43:45 +08:00
36 lines
747 B
TypeScript
36 lines
747 B
TypeScript
import { atom } from "recoil";
|
|
import { ApiType } from "./types";
|
|
|
|
export const atomThemeMode = atom<"light" | "dark">({
|
|
key: "atomThemeMode",
|
|
default: "light",
|
|
});
|
|
|
|
export const atomClashPort = atom<number>({
|
|
key: "atomClashPort",
|
|
default: 0,
|
|
});
|
|
|
|
export const atomLogData = atom<ApiType.LogItem[]>({
|
|
key: "atomLogData",
|
|
default: [],
|
|
});
|
|
|
|
// save the state of each profile item loading
|
|
export const atomLoadingCache = atom<Record<string, boolean>>({
|
|
key: "atomLoadingCache",
|
|
default: {},
|
|
});
|
|
|
|
// save update state
|
|
export const atomUpdateState = atom<boolean>({
|
|
key: "atomUpdateState",
|
|
default: false,
|
|
});
|
|
|
|
// current profile uid
|
|
export const atomCurrentProfile = atom<string>({
|
|
key: "atomCurrentProfile",
|
|
default: "",
|
|
});
|