feat: Añadir botón flotante para seleccionar servidor en dispositivos táctiles

This commit is contained in:
Shni
2025-10-15 03:21:52 -05:00
parent 037746e5cb
commit c3f20f99c2
2 changed files with 11 additions and 0 deletions

View File

@@ -165,6 +165,15 @@
mobileGuildModal.classList.remove('hidden');
});
}
// floating touch CTA logic
const floatBtn = document.getElementById('floatingTouchGuildBtn');
try {
const isTouch = (navigator.maxTouchPoints && navigator.maxTouchPoints > 0) || ('ontouchstart' in window);
if (floatBtn && isTouch) {
floatBtn.classList.remove('hidden');
floatBtn.addEventListener('click', (e) => { e.preventDefault(); mobileGuildModal?.classList.remove('hidden'); });
}
} catch(e){}
});
</script>