diff --git a/web/src/components/access/Access.js b/web/src/components/access/Access.js index d671569..8dc2328 100644 --- a/web/src/components/access/Access.js +++ b/web/src/components/access/Access.js @@ -7,8 +7,10 @@ import { Card, Col, Drawer, + Dropdown, Form, Input, + Menu, message, Modal, Row, @@ -21,22 +23,26 @@ import qs from "qs"; import request from "../../common/request"; import {server, wsServer} from "../../common/constants"; import { + AppstoreTwoTone, CloudDownloadOutlined, CloudUploadOutlined, + CopyOutlined, DeleteOutlined, + DesktopOutlined, + FileZipOutlined, FolderAddOutlined, LoadingOutlined, ReloadOutlined, UploadOutlined } from '@ant-design/icons'; -import CopyOutlined from "@ant-design/icons/lib/icons/CopyOutlined"; -import FolderOpenOutlined from "@ant-design/icons/lib/icons/FolderOpenOutlined"; import Upload from "antd/es/upload"; import {download, getToken} from "../../utils/utils"; import './Access.css' +import Draggable from 'react-draggable'; const {TextArea} = Input; const {DirectoryTree} = Tree; +const {SubMenu} = Menu; const STATE_IDLE = 0; const STATE_CONNECTING = 1; @@ -339,6 +345,7 @@ class Access extends Component { return true; } + console.log(keysym) this.state.client.sendKeyEvent(1, keysym); if (keysym === 65288) { return false; @@ -763,6 +770,15 @@ class Access extends Component { }); } + sendCombinationKey = (keys) => { + for (let i = 0; i < keys.length; i++) { + this.state.client.sendKeyEvent(1, keys[i]); + } + for (let j = 0; j < keys.length; j++) { + this.state.client.sendKeyEvent(0, keys[j]); + } + } + render() { const title = ( @@ -799,6 +815,23 @@ class Access extends Component { ); + const menu = ( + + } onClick={this.showClipboard}> + 剪贴板 + + } onClick={this.showFileSystem}> + 文件管理 + + }> + this.sendCombinationKey(['65507', '65513', '65535'])}>Ctrl+Alt+Delete + this.sendCombinationKey(['65507', '65513', '65288'])}>Ctrl+Alt+Backspace + + + ); + return (
@@ -850,32 +883,29 @@ class Access extends Component { - - - + + + + - - : null - } + {/*{*/} + {/* this.state.protocol === 'ssh' || this.state.protocol === 'rdp' ?*/} + {/* */} + {/* }*/} + {/* onClick={() => {*/} + {/* this.showFileSystem();*/} + {/* }}*/} + {/* >*/} + {/* */} + {/* */} + {/* : null*/} + {/*}*/} { let disabled = true; - let color = '#d9d9d9' if (record['recording'] && record['recording'] === '1') { disabled = false - color = '' } return (