From ea0d08c32188c36798007278e67c0d6fee93b65f Mon Sep 17 00:00:00 2001 From: josedario87 Date: Thu, 28 Aug 2025 14:08:03 -0600 Subject: [PATCH] mejoras de UI/UX v2 --- client/src/App.vue | 4 ++-- client/src/main.ts | 11 +++++++++++ client/src/views/DemoGame.vue | 2 +- client/src/views/Lobby.vue | 2 +- client/src/views/UuidSelector.vue | 24 ++++++++++++++---------- 5 files changed, 29 insertions(+), 14 deletions(-) diff --git a/client/src/App.vue b/client/src/App.vue index b07292f..55e51a0 100644 --- a/client/src/App.vue +++ b/client/src/App.vue @@ -19,6 +19,6 @@ body { } #app { - min-height: 100vh; + min-height: calc(var(--app-vh, 1vh) * 100); } - \ No newline at end of file + diff --git a/client/src/main.ts b/client/src/main.ts index 2960887..441ebd1 100644 --- a/client/src/main.ts +++ b/client/src/main.ts @@ -16,3 +16,14 @@ if ('serviceWorker' in navigator && import.meta.env.PROD) { }); }); } + +// Ajuste de altura dinámica para móviles (evita espacios en blanco por 100vh) +function setAppVhVar() { + try { + const vh = window.innerHeight * 0.01; + document.documentElement.style.setProperty('--app-vh', `${vh}px`); + } catch {} +} +setAppVhVar(); +window.addEventListener('resize', setAppVhVar); +window.addEventListener('orientationchange', setAppVhVar); diff --git a/client/src/views/DemoGame.vue b/client/src/views/DemoGame.vue index b892cbe..8be6eb7 100644 --- a/client/src/views/DemoGame.vue +++ b/client/src/views/DemoGame.vue @@ -451,7 +451,7 @@ async function leaveGame() {