Add back button to keys scene and allow fullscreen

Closes #29
This commit is contained in:
Unrud 2022-01-28 00:13:34 +01:00
parent facaacb3fb
commit c85275f263
7 changed files with 202 additions and 11 deletions

View file

@ -488,6 +488,11 @@ window.addEventListener("load", function() {
document.getElementById("reloadbutton").addEventListener("click", function() {
location.reload();
});
document.querySelectorAll(".backbutton").forEach(function(button) {
button.addEventListener("click", function() {
history.back();
});
});
document.addEventListener("touchstart", handleStart);
document.addEventListener("touchend", handleEnd);
document.addEventListener("touchcancel", handleEnd);

Binary file not shown.

View file

@ -30,7 +30,7 @@
<button id="sendbutton"></button>
</div>
</div>
<div id="keys" class="touchpad key hidden">
<div id="keys" class="touchpad key fullscreen hidden">
<div class="page">
<div class="buttons">
<button id="browserbackbutton"></button>
@ -66,4 +66,5 @@
</div>
</div>
<button id="switchbutton"></button>
<button class="backbutton"></button>
</div>

View file

@ -180,6 +180,13 @@ textarea {
border-right: none;
}
#keys .backbutton {
left: 0;
top: 0;
border-top: none;
border-left: none;
}
#keys .buttons {
display: flex;
justify-content: center;