Update script to allow closing explicitly
This commit is contained in:
parent
5f625452b0
commit
48f6acdc19
|
|
@ -1 +0,0 @@
|
|||
images/favicon.ico
|
||||
|
Before Width: | Height: | Size: 18 B After Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 18 B After Width: | Height: | Size: 1.1 KiB |
|
|
@ -46,6 +46,11 @@
|
|||
</script>
|
||||
|
||||
<style type="text/css">
|
||||
#zn-close {
|
||||
color:white;
|
||||
padding-left: 5px;
|
||||
font-size: 20px;
|
||||
}
|
||||
#zn-creds {
|
||||
display: none;
|
||||
color:white;
|
||||
|
|
@ -107,6 +112,7 @@
|
|||
<div>
|
||||
<a target="_blank" id="zn-download-link" style="display: none; color:white; padding-left: 5px; font-size: 20px;" href="#">Access your downloaded files here</a>
|
||||
</div>
|
||||
<div><a id="zn-close" href="#">Close Coyote Session Immediately</a></div>
|
||||
<div><a id="zn-show-creds" href="#">Show VNC Credentials</a> <a id="zn-vncurl">(open)</a></div>
|
||||
<table id="zn-creds"><tbody>
|
||||
<tr><td class="zn-creds-left">VNC Host: </td><td id="zn-creds-host"></td></tr>
|
||||
|
|
@ -352,6 +358,18 @@
|
|||
document.getElementById('zn-show-creds').addEventListener('click', function() {
|
||||
document.getElementById('zn-creds').style.display = "block";
|
||||
});
|
||||
document.getElementById('zn-close').addEventListener('click', function() {
|
||||
fetch('/acmd', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify({
|
||||
'cmd': 'stop',
|
||||
'tok': WebUtil.getConfigVar('tok', ''),
|
||||
}),
|
||||
}).then(r=>r.json()).then(d=>console.log(d)).catch(console.error);
|
||||
});
|
||||
|
||||
rfb.connect(host, port, password, path);
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue