diff --git a/app.js b/app.js index da33a48..c2f73a2 100644 --- a/app.js +++ b/app.js @@ -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); diff --git a/public/index.html b/public/index.html index f28eb79..ddd0f70 100644 --- a/public/index.html +++ b/public/index.html @@ -14,6 +14,20 @@ width: 100%; margin: 0px; } + #overlay { + position: absolute; + height: 100%; + width: 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 { display: block; position: relative; @@ -24,6 +38,7 @@ +
diff --git a/public/wetty/index.html b/public/wetty/index.html index f28eb79..95c0566 100644 --- a/public/wetty/index.html +++ b/public/wetty/index.html @@ -14,6 +14,21 @@ width: 100%; margin: 0px; } + #overlay { + position: absolute; + height: 100%; + width: 100%; + background-color: rgba(0,0,0,0.75);; + display: none; + z-index: 100; + } + #overlay input { + display: block; + margin: auto; + position: relative; + top: 50%; + transform: translateY(-50%); + } #terminal { display: block; position: relative; @@ -24,6 +39,7 @@ +
diff --git a/public/wetty/wetty.js b/public/wetty/wetty.js index d7068a8..96048e5 100644 --- a/public/wetty/wetty.js +++ b/public/wetty/wetty.js @@ -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"); });