35cd312fb7
a24c55b76d
@ -120,7 +120,8 @@ io.on('connection', function(socket){
socket.emit('output', data);
});
term.on('exit', function(code) {
console.log((new Date()) + " PID=" + term.pid + " ENDED")
console.log((new Date()) + " PID=" + term.pid + " ENDED");
socket.emit('logout');
socket.on('resize', function(data) {
term.resize(data.col, data.row);
@ -14,6 +14,20 @@
width: 100%;
margin: 0px;
}
#overlay {
position: absolute;
height: 100%;
background-color: rgba(0,0,0,0.75);;
display: none;
#overlay input {
display: block;
margin: auto;
position: relative;
top: 50%;
transform: translateY(-50%);
#terminal {
@ -24,6 +38,7 @@
</head>
<body>
<div id="overlay"><input type="button" onclick="javascript:location.reload();" value="reconnect" /></div>
<div id="terminal"></div>
</body>
@ -14,6 +14,21 @@
z-index: 100;
@ -24,6 +39,7 @@
@ -59,6 +59,11 @@ socket.on('output', function(data) {
term.io.writeUTF16(data);
socket.on('logout', function(data) {
console.log("user logout");
document.getElementById("overlay").style.display = "block";
socket.on('disconnect', function() {
console.log("Socket.io connection closed");