mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2026-01-11 01:44:50 +08:00
added a leave button to the result screen
This commit is contained in:
parent
f1c70b3ab3
commit
7b15f1cdb9
3 changed files with 20 additions and 6 deletions
|
|
@ -673,8 +673,6 @@ MP.socket.on("disconnect", (f) => {
|
|||
MP.room = undefined;
|
||||
Notifications.add("Disconnected from Tribe", 0);
|
||||
mp_resetLobby();
|
||||
mp_changeActiveSubpage("preloader");
|
||||
mp_resetLobby();
|
||||
mp_resetRace();
|
||||
mp_changeActiveSubpage("preloader");
|
||||
// $(".pageTribe .preloader div").removeClass("hidden");
|
||||
|
|
@ -758,6 +756,8 @@ MP.socket.on("mp_room_leave", () => {
|
|||
MP.name.replace(/\(\d\)$/g, "");
|
||||
mp_resetLobby();
|
||||
mp_changeActiveSubpage("prelobby");
|
||||
mp_resetLobby();
|
||||
mp_resetRace();
|
||||
// swapElements($(".pageTribe .lobby"), $(".pageTribe .prelobby"), 250);
|
||||
});
|
||||
|
||||
|
|
@ -1238,7 +1238,9 @@ $(".pageTribe .prelobby #joinByCode input").keyup((e) => {
|
|||
}, 0);
|
||||
});
|
||||
|
||||
$(".pageTribe .lobby .lobbyButtons .leaveRoomButton").click((e) => {
|
||||
$(
|
||||
".pageTribe .lobby .lobbyButtons .leaveRoomButton, .pageTest #result .resultMpButtons .leaveRoomButton"
|
||||
).click((e) => {
|
||||
MP.socket.emit("mp_room_leave");
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -1570,8 +1570,12 @@ key {
|
|||
display: grid;
|
||||
gap: 1rem;
|
||||
grid-area: tribe;
|
||||
.timer {
|
||||
text-align: center;
|
||||
.timerAndButtons {
|
||||
display: grid;
|
||||
grid-template-columns: 3fr 1fr;
|
||||
.timer {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
table {
|
||||
thead {
|
||||
|
|
|
|||
|
|
@ -1249,7 +1249,15 @@
|
|||
</div>
|
||||
<div id="result" class="hidden">
|
||||
<div class="tribeResult hidden">
|
||||
<div class="timer" style="opacity: 0">Timer</div>
|
||||
<div class="timerAndButtons">
|
||||
<div class="timer" style="opacity: 0">Timer</div>
|
||||
<div class="resultMpButtons">
|
||||
<div class="button leaveRoomButton">
|
||||
<i class="fas fa-door-open"></i>
|
||||
Leave room
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue