mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 17:15:38 +08:00
refactor: impl as struct methods
This commit is contained in:
@@ -22,8 +22,7 @@ import {
|
||||
} from "@mui/icons-material";
|
||||
import { updateProxy } from "../services/api";
|
||||
import { ApiType } from "../services/types";
|
||||
import { getProfiles, setProfiles } from "../services/cmds";
|
||||
import noop from "../utils/noop";
|
||||
import { getProfiles, patchProfile } from "../services/cmds";
|
||||
|
||||
interface ItemProps {
|
||||
proxy: ApiType.ProxyItem;
|
||||
@@ -105,7 +104,7 @@ const ProxyGroup = ({ group }: Props) => {
|
||||
profile.selected[index] = { name: group.name, now: name };
|
||||
}
|
||||
|
||||
setProfiles(profiles.current!, profile).catch(console.error);
|
||||
patchProfile(profiles.current!, profile).catch(console.error);
|
||||
} catch {
|
||||
setNow(oldValue);
|
||||
// Todo
|
||||
|
||||
Reference in New Issue
Block a user