diff --git a/client/src/components/RoomsTable.vue b/client/src/components/RoomsTable.vue index dc6d296..61d4aad 100644 --- a/client/src/components/RoomsTable.vue +++ b/client/src/components/RoomsTable.vue @@ -96,6 +96,27 @@ > 📊 Details +
+ +
+ @@ -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; diff --git a/client/src/router/index.ts b/client/src/router/index.ts index a2c3646..d141b37 100644 --- a/client/src/router/index.ts +++ b/client/src/router/index.ts @@ -3,6 +3,7 @@ import Lobby from '../views/Lobby.vue'; import Game from '../views/Game.vue'; import Dashboard from '../views/Dashboard.vue'; import DemoGame from '../views/DemoGame.vue'; +import UuidSelector from '../views/UuidSelector.vue'; const router = createRouter({ history: createWebHistory(), @@ -29,14 +30,13 @@ const router = createRouter({ }, { path: '/', - redirect: '/missing-uuid' + name: 'UuidSelector', + component: UuidSelector }, { - // simple fallback for users hitting root without UUID + // Redirect old missing-uuid path to the new selector path: '/missing-uuid', - component: { - template: `

Falta UUID

Abre el juego escaneando tu código QR: snatchgame.nucleoriofrio.com/{uuid}

` - } + redirect: '/' } ] }); diff --git a/client/src/views/Dashboard.vue b/client/src/views/Dashboard.vue index cd003ef..9980b81 100644 --- a/client/src/views/Dashboard.vue +++ b/client/src/views/Dashboard.vue @@ -37,6 +37,10 @@ + + + +