From a143c3b58051052f17ac7fdc41698b528d49046b Mon Sep 17 00:00:00 2001 From: Cian Butler Date: Sat, 8 Apr 2017 20:53:42 +0100 Subject: [PATCH] Reconnect button (#3) * Add a reconnect button on logout Prior to this, the only way to return to a session after logging out or login timeout was to manually reload the page. This gives you a nice button to do it for you. Ping @joshsamuelson * Forgot the z-index * Whoa, there's two copies? Not sure why there are two index.html files, but... * Forgot the z-index --- app.js | 3 ++- public/index.html | 15 +++++++++++++++ public/wetty/index.html | 16 ++++++++++++++++ public/wetty/wetty.js | 5 +++++ 4 files changed, 38 insertions(+), 1 deletion(-) 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 da7a8a1..df8d091 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 @@ +