修复接入时弹出文件管理导致无法输出的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

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 () => {