From 48046a794e7017ae8d25043f4b866cb36460bd46 Mon Sep 17 00:00:00 2001 From: josedario87 Date: Wed, 27 Aug 2025 17:27:29 -0600 Subject: [PATCH] cambio de G desactivado bajo easterEgg --- client/src/views/DemoGame.vue | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/client/src/views/DemoGame.vue b/client/src/views/DemoGame.vue index d35249d..86290b0 100644 --- a/client/src/views/DemoGame.vue +++ b/client/src/views/DemoGame.vue @@ -14,14 +14,21 @@ />
-

🧪 Demo Room

+

💼 Sala de negocios

Room: {{ roomId }}
Round: {{ currentRound }}/3
Status: {{ gameStatus }}
-
@@ -112,6 +119,21 @@ const outcomeP2 = ref(0); const variants = ['G1','G2','G3','G4','G5']; +// Hidden admin unlock via 5-clicks on title +const adminUnlockedHeader = ref(false); +const headerClickCount = ref(0); +let headerClickResetTimer: any = null; +function onTitleClick() { + if (headerClickResetTimer) { clearTimeout(headerClickResetTimer); headerClickResetTimer = null; } + headerClickCount.value += 1; + if (headerClickCount.value >= 5) { + adminUnlockedHeader.value = true; + } else { + headerClickResetTimer = setTimeout(() => { headerClickCount.value = 0; }, 1200); + } +} +const titleUnlockTitle = computed(() => adminUnlockedHeader.value ? 'Controles de variante desbloqueados' : `Clicks: ${headerClickCount.value}/5 para desbloquear`); + // End-of-game modal visibility const endModalVisible = ref(false); function showEndModal() { if (!endModalVisible.value) endModalVisible.value = true; } @@ -216,6 +238,11 @@ const componentMap: Record = { G1, G2, G3, G4, G5 }; const currentComponent = computed(() => componentMap[currentVariant.value]); onMounted(() => { + // Reset header unlock state on mount + adminUnlockedHeader.value = false; + headerClickCount.value = 0; + if (headerClickResetTimer) { clearTimeout(headerClickResetTimer); headerClickResetTimer = null; } + let room = colyseusService.gameRoom.value; if (!room) { router.push(`/${routeUuid.value}`); @@ -417,6 +444,7 @@ async function leaveGame() { .btn { padding: 8px 12px; border-radius: 8px; border: none; cursor: pointer; } .btn-variant { background: #f2f2f2; } .btn-variant.active { background: #667eea; color: white; } +.btn-variant:disabled { opacity: 0.55; cursor: default; filter: grayscale(0.2) brightness(0.98); box-shadow: none; } .btn-next { background:#2196f3; color:white; margin-top: 12px; } .btn-leave { background:#f44336; color:white; } .players-section { display:grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 12px 0; }