mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2024-11-16 11:42:21 +08:00
fix: macOS transition flickers close #47
This commit is contained in:
parent
40bcb22977
commit
db3b634e62
|
@ -20,6 +20,7 @@ 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";
|
||||||
|
@ -40,6 +41,8 @@ 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;
|
||||||
|
@ -267,6 +270,9 @@ 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,6 +13,7 @@ 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";
|
||||||
|
@ -29,6 +30,8 @@ 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;
|
||||||
|
@ -219,6 +222,9 @@ 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();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user