add reload button to disconnected-page

This commit is contained in:
Unrud 2018-06-25 06:12:37 +02:00
parent b3fa4c1b27
commit 16a807f144
4 changed files with 20 additions and 11 deletions

File diff suppressed because one or more lines are too long

View file

@ -378,6 +378,10 @@ window.addEventListener("load", function() {
window.history.back();
}
};
document.getElementById("reloadbutton").addEventListener("click",
function(e) {
location.reload();
});
pad.addEventListener("touchstart", handleStart, false);
pad.addEventListener("touchend", handleEnd, false);
pad.addEventListener("touchcancel", handleCancel, false);

View file

@ -16,6 +16,7 @@
</div>
<div id="closed">
<p>Disconnected</p>
<button id="reloadbutton"></button>
</div>
<div id="pad">
<p id="padlabel">Touchpad</p>

View file

@ -20,6 +20,7 @@ body {
font-size: 2em;
color: white;
word-wrap: break-word;
flex-direction: column;
}
#pad {
@ -42,16 +43,19 @@ body {
word-wrap: break-word;
}
#fullscreenbutton, #keyboardbutton, #sendbutton {
#fullscreenbutton, #keyboardbutton, #sendbutton, #reloadbutton {
background-color: transparent;
border: 1px solid black;
border-bottom: none;
height: 1.5em;
width: 2em;
font-size: 2em;
color: white;
}
#fullscreenbutton, #keyboardbutton, #sendbutton {
border-bottom: none;
}
#fullscreenbutton {
border-left: none;
}