From 74ea90cee3452f4ed8330d427c85e0877c1b48c1 Mon Sep 17 00:00:00 2001 From: Shni Date: Wed, 15 Oct 2025 03:26:01 -0500 Subject: [PATCH] =?UTF-8?q?feat:=20Mostrar=20bot=C3=B3n=20flotante=20en=20?= =?UTF-8?q?dispositivos=20t=C3=A1ctiles=20o=20en=20vistas=20peque=C3=B1as?= =?UTF-8?q?=20para=20seleccionar=20servidor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/server/views/partials/dashboard_nav.ejs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/server/views/partials/dashboard_nav.ejs b/src/server/views/partials/dashboard_nav.ejs index 0e176e6..92ab0ad 100644 --- a/src/server/views/partials/dashboard_nav.ejs +++ b/src/server/views/partials/dashboard_nav.ejs @@ -172,7 +172,10 @@ const floatBtn = document.getElementById('floatingTouchGuildBtn'); try { const isTouch = (navigator.maxTouchPoints && navigator.maxTouchPoints > 0) || ('ontouchstart' in window); - if (floatBtn && isTouch) { + const w = window.innerWidth || document.documentElement.clientWidth; + const h = window.innerHeight || document.documentElement.clientHeight; + const isSmallViewport = (h <= 800) || (w/h > 1.6); + if (floatBtn && (isTouch || isSmallViewport)) { floatBtn.classList.remove('hidden'); floatBtn.addEventListener('click', (e) => { e.preventDefault(); mobileGuildModal?.classList.remove('hidden'); }); }