revert Merge branch 'main' of https://git.desarrolloalcala.com/jorge/triviagmatico
This commit is contained in:
2026-10-01 11:15:10 +02:00
parent e3395a017c
commit cd0685f41c
11 changed files with 946 additions and 162 deletions
+1 -1
View File
@@ -276,7 +276,7 @@ $(document).on("click", ".btn-abandonar-sala", function () {
mensaje.text(
"Si abandonas la sala como anfitrión, la partida terminará para todos los jugadores.",
);
botonConfirmar.text("Sí, terminar partida");
botonConfirmar.text("Sí, abandonar");
} else {
titulo.text("¿Abandonar la sala?");
mensaje.text(
+5 -5
View File
@@ -36,11 +36,11 @@ function renderizarTablaRanking(jugadores) {
<thead class="table-dark">
<tr>
<th scope="col" style="width: 10%;">#</th>
<th scope="col" class="text-start" style="width: 30%;"><i class="fa-solid fa-user"></i> <br> Jugador</th>
<th scope="col" style="width: 15%;"><i class="fa-solid fa-trophy text-warning me-1"></i> <br> Victorias</th>
<th scope="col" style="width: 15%;"><i class="fa-solid fa-xmark text-danger me-1"></i> <br> Derrotas</th>
<th scope="col" style="width: 15%;"><i class="fa-solid fa-bullseye text-success me-1"></i> <br> Aciertos</th>
<th scope="col" style="width: 15%;"><i class="fa-solid fa-medal text-info me-1"></i> <br> Efectividad</th>
<th scope="col" class="text-start" style="width: 35%;">Jugador</th>
<th scope="col" style="width: 15%;"><i class="fa-solid fa-trophy text-warning me-1"></i> Vic</th>
<th scope="col" style="width: 15%;"><i class="fa-solid fa-xmark text-danger me-1"></i> Der</th>
<th scope="col" style="width: 15%;"><i class="fa-solid fa-bullseye text-success me-1"></i> Aciertos</th>
<th scope="col" style="width: 10%;"><i class="fa-solid fa-percent text-info me-1"></i> % Vic</th>
</tr>
</thead>
<tbody>
+2 -14
View File
@@ -20,18 +20,7 @@ let bloqueado = false; // true mientras se envía una respuesta o se ve el feedb
let numeroAciertos = 0; // número de aciertos del jugador
$(document).ready(function () {
// Obtenemos el idPartida de la URL
// Ejemplo: juego.php?idPartida=3
const parametros = new URLSearchParams(window.location.search);
idPartida = parseInt(parametros.get("idPartida"), 10);
if (!idPartida || idPartida < 1) {
mostrarError("La partida indicada no es válida.");
return;
}
idPartida = parseInt($("body").data("id-partida"), 10);
// Un solo listener para todos los botones de respuesta
$("#respuestas").on("click", ".btn-answer", function () {
@@ -114,7 +103,6 @@ function responder($botonPulsado) {
if (bloqueado) {
return;
}
bloqueado = true;
const pregunta = preguntas[indice];
@@ -228,4 +216,4 @@ function mostrarError(mensaje) {
$("#feedback").html(
'<a href="buscadorSala.php">Volver al buscador de salas</a>',
);
}
}