fixed bugs
This commit is contained in:
@@ -50,13 +50,14 @@ class LobbyHandler {
|
|||||||
|
|
||||||
let playerHTML = "";
|
let playerHTML = "";
|
||||||
this.playerList.forEach((player, index) => {
|
this.playerList.forEach((player, index) => {
|
||||||
const amI = player.id === this.user.id ? " (Ich)" : "";
|
const amI = player.id === this.user.id ? ` <span class="message">Ich</span>` : "";
|
||||||
playerHTML += `
|
playerHTML += `
|
||||||
<div class="player" id="player${index + 1}">
|
<div class="player" id="player${index + 1}">
|
||||||
<h1>Spieler ${index + 1}${amI}</h1>
|
<h1>Spieler ${index + 1}${amI}</h1>
|
||||||
<h1>${player.username}</h1>
|
<h1>${player.username}</h1>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
|
});
|
||||||
|
|
||||||
lobbyContainer.innerHTML = `
|
lobbyContainer.innerHTML = `
|
||||||
<div class="screen">
|
<div class="screen">
|
||||||
@@ -71,18 +72,17 @@ class LobbyHandler {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
});
|
|
||||||
|
|
||||||
const codeText = document.getElementById("code");
|
const codeText = document.getElementById("code");
|
||||||
codeText.addEventListener("click", () => {
|
codeText.addEventListener("click", (event) => {
|
||||||
codeText.innerText = "Kopiert!"
|
event.target.innerText = "Kopiert!"
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
codeText.innerText = this.code;
|
codeText.innerText = this.code;
|
||||||
}, 1500);
|
}, 1500);
|
||||||
|
|
||||||
navigator.clipboard.writeText(this.code);
|
navigator.clipboard.writeText(this.code);
|
||||||
})
|
});
|
||||||
|
|
||||||
this.errorMsg.style.display = "none";
|
this.errorMsg.style.display = "none";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ button {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
height: 20%;
|
height: 20%;
|
||||||
|
|
||||||
background-color: rgba(255, 255, 255, 0.377);
|
background-color: rgb(124, 124, 124);
|
||||||
border-radius: 10px 10px 0 0;
|
border-radius: 10px 10px 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,12 +56,12 @@ button {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#player1{
|
#player1{
|
||||||
background-color: rgba(255, 8, 0, 0.377);
|
background-color: rgb(187, 6, 0, 0.6);
|
||||||
border-radius: 0 0 0 0;
|
border-radius: 0 0 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#player2{
|
#player2{
|
||||||
background-color: rgba(0, 89, 255, 0.377);
|
background-color: rgba(0, 52, 150, 0.6);
|
||||||
border-radius: 0 0 10px 10px;
|
border-radius: 0 0 10px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user