1
0
Fork 0

Improve session closing

pull/2/head
Ambrose Chua 2018-03-12 01:09:01 +09:00
parent 9c846cca54
commit cf20e90cc6
2 changed files with 7 additions and 2 deletions

View File

@ -2,9 +2,10 @@
$(document).ready(() => { $(document).ready(() => {
let $shell = $("#shell"); let $shell = $("#shell");
if (!$shell) { if ($shell.length < 1) {
return; return;
} }
let $close = $(".shell-close");
let closeTimeout = null; let closeTimeout = null;
@ -90,4 +91,8 @@ $(document).ready(() => {
}, 2000); }, 2000);
}); });
$close.click(() => {
socket.disconnect();
});
}); });

View File

@ -6,7 +6,7 @@
<nav class="navbar navbar-light bg-light fixed-bottom justify-content-between"> <nav class="navbar navbar-light bg-light fixed-bottom justify-content-between">
<div class="btn-group mr-auto" role="group"> <div class="btn-group mr-auto" role="group">
<a class="btn btn-primary" href="/{{path}}"> <a class="btn btn-primary" href="/{{path}}" class="shell-close">
<span class="octicon octicon-chevron-left"></span> <span class="octicon octicon-chevron-left"></span>
Close shell Close shell
</a> </a>