diff --git a/src/component/FileManager/Explorer.js b/src/component/FileManager/Explorer.js index daea6d2..583c1ea 100644 --- a/src/component/FileManager/Explorer.js +++ b/src/component/FileManager/Explorer.js @@ -16,6 +16,7 @@ import SadIcon from "@material-ui/icons/SentimentVeryDissatisfied"; import classNames from "classnames"; import ImgPreivew from "./ImgPreview"; import pathHelper from "../../utils/page"; +import { isMac } from "../../utils" import { withRouter } from "react-router-dom"; import { Table, @@ -177,7 +178,7 @@ class ExplorerCompoment extends Component { super(); this.keyMap = { DELETE_FILE: "del", - SELECT_ALL: "ctrl+a" + SELECT_ALL: `${isMac() ? 'command' : 'ctrl'}+a` }; this.handlers = { diff --git a/src/utils/index.js b/src/utils/index.js index 9f6c7ec..7a9b6f2 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -188,4 +188,8 @@ export function getNumber(base,conditions){ } }) return base +} + +export const isMac = () => { + return "MACINTEL" === navigator.platform.toUpperCase() } \ No newline at end of file