fix: rm macOS transition props
This commit is contained in:
parent
7aecd83c4a
commit
2f3b6b29ae
@ -26,7 +26,6 @@ import {
|
|||||||
changeProfileValid,
|
changeProfileValid,
|
||||||
} from "../../services/cmds";
|
} from "../../services/cmds";
|
||||||
import { CmdType } from "../../services/types";
|
import { CmdType } from "../../services/types";
|
||||||
import getSystem from "../../utils/get-system";
|
|
||||||
import ProfileMore from "./profile-more";
|
import ProfileMore from "./profile-more";
|
||||||
import Notice from "../base/base-notice";
|
import Notice from "../base/base-notice";
|
||||||
|
|
||||||
@ -35,8 +34,6 @@ interface Props {
|
|||||||
chain: string[];
|
chain: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
const OS = getSystem();
|
|
||||||
|
|
||||||
const EnhancedMode = (props: Props) => {
|
const EnhancedMode = (props: Props) => {
|
||||||
const { items, chain } = props;
|
const { items, chain } = props;
|
||||||
|
|
||||||
@ -147,9 +144,6 @@ const EnhancedMode = (props: Props) => {
|
|||||||
anchorEl={anchorEl}
|
anchorEl={anchorEl}
|
||||||
onClose={() => setAnchorEl(null)}
|
onClose={() => setAnchorEl(null)}
|
||||||
transitionDuration={225}
|
transitionDuration={225}
|
||||||
TransitionProps={
|
|
||||||
OS === "macos" ? { style: { transitionDuration: "225ms" } } : {}
|
|
||||||
}
|
|
||||||
MenuListProps={{
|
MenuListProps={{
|
||||||
dense: true,
|
dense: true,
|
||||||
"aria-labelledby": "profile-use-button",
|
"aria-labelledby": "profile-use-button",
|
||||||
|
@ -20,7 +20,6 @@ import { CmdType } from "../../services/types";
|
|||||||
import { atomLoadingCache } from "../../services/states";
|
import { atomLoadingCache } from "../../services/states";
|
||||||
import { updateProfile, deleteProfile, viewProfile } from "../../services/cmds";
|
import { updateProfile, deleteProfile, viewProfile } from "../../services/cmds";
|
||||||
import parseTraffic from "../../utils/parse-traffic";
|
import parseTraffic from "../../utils/parse-traffic";
|
||||||
import getSystem from "../../utils/get-system";
|
|
||||||
import ProfileEdit from "./profile-edit";
|
import ProfileEdit from "./profile-edit";
|
||||||
import FileEditor from "./file-editor";
|
import FileEditor from "./file-editor";
|
||||||
import Notice from "../base/base-notice";
|
import Notice from "../base/base-notice";
|
||||||
@ -41,8 +40,6 @@ const round = keyframes`
|
|||||||
to { transform: rotate(360deg); }
|
to { transform: rotate(360deg); }
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const OS = getSystem();
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
selected: boolean;
|
selected: boolean;
|
||||||
itemData: CmdType.ProfileItem;
|
itemData: CmdType.ProfileItem;
|
||||||
@ -302,9 +299,6 @@ const ProfileItem = (props: Props) => {
|
|||||||
anchorPosition={position}
|
anchorPosition={position}
|
||||||
anchorReference="anchorPosition"
|
anchorReference="anchorPosition"
|
||||||
transitionDuration={225}
|
transitionDuration={225}
|
||||||
TransitionProps={
|
|
||||||
OS === "macos" ? { style: { transitionDuration: "225ms" } } : {}
|
|
||||||
}
|
|
||||||
onContextMenu={(e) => {
|
onContextMenu={(e) => {
|
||||||
setAnchorEl(null);
|
setAnchorEl(null);
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
@ -13,7 +13,6 @@ import {
|
|||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
import { CmdType } from "../../services/types";
|
import { CmdType } from "../../services/types";
|
||||||
import { viewProfile } from "../../services/cmds";
|
import { viewProfile } from "../../services/cmds";
|
||||||
import getSystem from "../../utils/get-system";
|
|
||||||
import enhance from "../../services/enhance";
|
import enhance from "../../services/enhance";
|
||||||
import ProfileEdit from "./profile-edit";
|
import ProfileEdit from "./profile-edit";
|
||||||
import FileEditor from "./file-editor";
|
import FileEditor from "./file-editor";
|
||||||
@ -30,8 +29,6 @@ const Wrapper = styled(Box)(({ theme }) => ({
|
|||||||
boxSizing: "border-box",
|
boxSizing: "border-box",
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const OS = getSystem();
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
selected: boolean;
|
selected: boolean;
|
||||||
itemData: CmdType.ProfileItem;
|
itemData: CmdType.ProfileItem;
|
||||||
@ -223,9 +220,6 @@ const ProfileMore = (props: Props) => {
|
|||||||
anchorPosition={position}
|
anchorPosition={position}
|
||||||
anchorReference="anchorPosition"
|
anchorReference="anchorPosition"
|
||||||
transitionDuration={225}
|
transitionDuration={225}
|
||||||
TransitionProps={
|
|
||||||
OS === "macos" ? { style: { transitionDuration: "225ms" } } : {}
|
|
||||||
}
|
|
||||||
onContextMenu={(e) => {
|
onContextMenu={(e) => {
|
||||||
setAnchorEl(null);
|
setAnchorEl(null);
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
@ -4,11 +4,9 @@ import { useLockFn } from "ahooks";
|
|||||||
import { Menu, MenuItem } from "@mui/material";
|
import { Menu, MenuItem } from "@mui/material";
|
||||||
import { Settings } from "@mui/icons-material";
|
import { Settings } from "@mui/icons-material";
|
||||||
import { changeClashCore, getVergeConfig } from "../../services/cmds";
|
import { changeClashCore, getVergeConfig } from "../../services/cmds";
|
||||||
import getSystem from "../../utils/get-system";
|
import { getVersion } from "../../services/api";
|
||||||
import Notice from "../base/base-notice";
|
import Notice from "../base/base-notice";
|
||||||
|
|
||||||
const OS = getSystem();
|
|
||||||
|
|
||||||
const VALID_CORE = [
|
const VALID_CORE = [
|
||||||
{ name: "Clash", core: "clash" },
|
{ name: "Clash", core: "clash" },
|
||||||
{ name: "Clash Meta", core: "clash-meta" },
|
{ name: "Clash Meta", core: "clash-meta" },
|
||||||
@ -31,7 +29,7 @@ const CoreSwitch = () => {
|
|||||||
await changeClashCore(core);
|
await changeClashCore(core);
|
||||||
mutate("getVergeConfig");
|
mutate("getVergeConfig");
|
||||||
mutate("getClashConfig");
|
mutate("getClashConfig");
|
||||||
mutate("getVersion");
|
mutate("getVersion", getVersion());
|
||||||
setAnchorEl(null);
|
setAnchorEl(null);
|
||||||
Notice.success(`Successfully switch to ${core}`, 1000);
|
Notice.success(`Successfully switch to ${core}`, 1000);
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
@ -58,9 +56,6 @@ const CoreSwitch = () => {
|
|||||||
anchorPosition={position}
|
anchorPosition={position}
|
||||||
anchorReference="anchorPosition"
|
anchorReference="anchorPosition"
|
||||||
transitionDuration={225}
|
transitionDuration={225}
|
||||||
TransitionProps={
|
|
||||||
OS === "macos" ? { style: { transitionDuration: "225ms" } } : {}
|
|
||||||
}
|
|
||||||
onContextMenu={(e) => {
|
onContextMenu={(e) => {
|
||||||
setAnchorEl(null);
|
setAnchorEl(null);
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
Loading…
Reference in New Issue
Block a user