feat: mejoras al dashboard y selector de UUID

- Dashboard: agregar opciones de 50 pestañas deterministas (lotes 1-4)
- Dashboard: botón para cerrar salas individuales y expulsar jugadores
- Dashboard: selector de variante G por sala individual en tabla
- Nuevo selector moderno de UUID en página principal
- Mostrar nombres de jugadores en selector de UUID
- Búsqueda por UUID o nombre de jugador
- Redireccionar /missing-uuid a selector principal
- Endpoints para obtener UUIDs con nombres y cerrar/cambiar variante de salas
This commit is contained in:
2025-08-15 22:56:07 -06:00
parent f214174bab
commit ace9f8ee50
5 changed files with 581 additions and 12 deletions

View File

@@ -96,6 +96,27 @@
>
📊 Details
</button>
<div class="variant-selector-container">
<select
:value="room.metadata?.currentVariant || 'G1'"
@change="$emit('changeVariant', room.roomId, ($event.target as HTMLSelectElement).value)"
class="variant-select"
title="Cambiar variante"
>
<option value="G1">G1</option>
<option value="G2">G2</option>
<option value="G3">G3</option>
<option value="G4">G4</option>
<option value="G5">G5</option>
</select>
</div>
<button
@click="$emit('closeRoom', room.roomId)"
class="btn btn-close"
title="Expulsar jugadores y cerrar sala"
>
🚪 Cerrar
</button>
</td>
</tr>
</tbody>
@@ -145,6 +166,8 @@ const props = defineProps<{
defineEmits<{
refresh: [];
viewRoomModal: [roomId: string];
closeRoom: [roomId: string];
changeVariant: [roomId: string, variant: string];
}>();
function getRoomDetails(roomId: string) {
@@ -243,6 +266,47 @@ function getReadableTextColor(hex?: string): string {
transform: translateY(-1px);
}
.btn-close {
background: #f44336;
color: white;
padding: 6px 12px;
font-size: 12px;
margin-left: 4px;
}
.btn-close:hover {
background: #d32f2f;
transform: translateY(-1px);
}
.variant-selector-container {
display: inline-block;
margin: 0 4px;
}
.variant-select {
padding: 4px 8px;
border: 1px solid #ddd;
border-radius: 4px;
background: white;
font-size: 12px;
font-weight: 600;
color: #333;
cursor: pointer;
transition: all 0.2s;
}
.variant-select:hover {
border-color: #9c27b0;
background: #f8f9fa;
}
.variant-select:focus {
outline: none;
border-color: #9c27b0;
box-shadow: 0 0 0 2px rgba(156, 39, 176, 0.2);
}
.no-rooms {
text-align: center;
padding: 40px;