修复接入时弹出文件管理导致无法输出的bug

This commit is contained in:
dushixiang 2021-02-12 19:58:57 +08:00
parent a6a97ad502
commit e1f76105e7
4 changed files with 24 additions and 15 deletions

1
go.sum
View File

@ -184,6 +184,7 @@ github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7z
github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU=
github.com/robfig/cron/v3 v3.0.0 h1:kQ6Cb7aHOHTSzNVNEhmp8EcWKLb4CbiMW9h9VyIhO4E=
github.com/robfig/cron/v3 v3.0.0/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro=
github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs=
github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro=
github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg=
github.com/rogpeppe/go-internal v1.3.0 h1:RR9dF3JtopPvtkroDZuVD7qquD0bnHlKSqaQhgwt8yk=

View File

@ -1,19 +1,19 @@
// prod
let wsPrefix;
if (window.location.protocol === 'https:') {
wsPrefix = 'wss:'
} else {
wsPrefix = 'ws:'
}
export const server = '';
export const wsServer = wsPrefix + window.location.host;
export const prefix = window.location.protocol + '//' + window.location.host;
// let wsPrefix;
// if (window.location.protocol === 'https:') {
// wsPrefix = 'wss:'
// } else {
// wsPrefix = 'ws:'
// }
//
// export const server = '';
// export const wsServer = wsPrefix + window.location.host;
// export const prefix = window.location.protocol + '//' + window.location.host;
// dev
// export const server = '//127.0.0.1:8088';
// export const wsServer = 'ws://127.0.0.1:8088';
// export const prefix = '';
export const server = '//127.0.0.1:8088';
export const wsServer = 'ws://127.0.0.1:8088';
export const prefix = '';
export const PROTOCOL_COLORS = {
'rdp': 'red',

View File

@ -47,7 +47,8 @@ class Access extends Component {
uploadLoading: false,
startTime: new Date(),
fullScreen: false,
fullScreenBtnText: '进入全屏'
fullScreenBtnText: '进入全屏',
sink: undefined
};
async componentDidMount() {
@ -434,6 +435,7 @@ class Access extends Component {
containerWidth: width,
containerHeight: height,
keyboard: keyboard,
sink: sink
});
}
@ -622,6 +624,9 @@ class Access extends Component {
closable={true}
// maskClosable={false}
onClose={() => {
if (this.state.sink) {
this.state.sink.focus();
}
this.setState({
fileSystemVisible: false
});
@ -666,6 +671,9 @@ class Access extends Component {
}}
confirmLoading={this.state.confirmLoading}
onCancel={() => {
if (this.state.sink) {
this.state.sink.focus();
}
this.setState({
clipboardVisible: false
})

View File

@ -280,7 +280,7 @@ class OnlineSession extends Component {
return (
<div>
<Button type="link" size='small' onClick={() => {
<Button type="link" size='small' disabled={record['mode'] === 'naive'} onClick={() => {
this.showMonitor(record)
}}>监控</Button>
<Button type="link" size='small' onClick={async () => {