From 287a8eb0f5675e2aa045e99fae9c0d5f7a19a7c7 Mon Sep 17 00:00:00 2001 From: dushixiang <798148596@qq.com> Date: Mon, 18 Jan 2021 20:26:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8F=91=E9=80=81=E5=BF=AB?= =?UTF-8?q?=E6=8D=B7=E9=94=AE=E7=9A=84=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/components/access/Access.js | 82 +++++++++++++------- web/src/components/asset/AssetModal.js | 1 - web/src/components/session/OfflineSession.js | 2 - 3 files changed, 56 insertions(+), 29 deletions(-) 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 = ( +
+ ); + return (