Commit 6a037578 authored by ibuler's avatar ibuler

[Update] Merge with dev

parents 48dee5e8 70393df3
......@@ -39,8 +39,9 @@ li span {
padding-right: 14px;
line-height: 26px;
cursor: default;
width: 115px;
height: 21px;
/*width: 145px;*/
height: 26px;
display: block;
}
li a.close {
......@@ -63,17 +64,17 @@ li.active span {
padding-left: 12px;
line-height: 26px;
color: white;
height: 18px;
height: 26px;
}
li input {
font-family: 'Roboto', sans-serif;
font-size: 13px;
width: 115px;
width: 120px;
border: none;
background-color: inherit;
color: white;
padding: 5px 20px 4px 15px;
height: 18px;
height: 26px;
}
......@@ -99,3 +99,12 @@
cursor: default;
color: #c5babc;
}
.nav ul li.disconnected {
background-color: darkgray;
}
.nav ul li.active {
box-sizing: border-box;
border-bottom: 3px solid #19aa8d !important;
}
......@@ -92,6 +92,14 @@ export class ElementNavComponent implements OnInit {
}
case'Disconnect': {
if (!confirm('断开当前连接?')) {
return
}
}
case 'Reconnect': {
break;
}
case 'Disconnect': {
if (!confirm('断开当前连接? (RDP暂不支持)')) {
break;
}
this._navSvc.disconnectConnection();
......@@ -220,6 +228,11 @@ export class ElementNavComponent implements OnInit {
'click': 'DisconnectAll',
'name': 'Disconnect all'
},
{
'id': 'Reconnect',
'click': 'Reconnect',
'name': 'Reconnect'
},
]
}, {
'id': 'FileManager',
......
......@@ -3,7 +3,7 @@ import {Terminal} from 'xterm';
import {View} from '../content/model';
import {LogService, UUIDService} from '../../app.service';
import {Socket} from '../../utils/socket';
import {getWsSocket} from '../../globals';
import {getWsSocket, translate} from '../../globals';
@Component({
......@@ -55,7 +55,17 @@ export class ElementSshTermComponent implements OnInit, OnDestroy {
}
}
connectHost() {
reconnect() {
if (this.view.connected === true) {
if (!confirm(translate('Are you sure to reconnect it?(RDP not support)'))) {
return;
}
}
this.secret = this._uuid.gen();
this.emitHostAndTokenData();
}
emitHostAndTokenData() {
if (this.host) {
const data = {
uuid: this.host.id,
......@@ -73,6 +83,10 @@ export class ElementSshTermComponent implements OnInit, OnDestroy {
this._logger.debug('On token event trigger');
this.ws.emit('token', data);
}
}
connectHost() {
this.emitHostAndTokenData();
this.term.on('data', data => {
const d = {'data': data, 'room': this.roomID};
......@@ -103,6 +117,7 @@ export class ElementSshTermComponent implements OnInit, OnDestroy {
this._logger.debug('On room', data);
this.roomID = data.room;
this.view.room = data.room;
this.view.connected = true;
}
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment