feat: Añadir botón móvil para seleccionar servidor y vincularlo al modal correspondiente

This commit is contained in:
Shni
2025-10-15 03:17:22 -05:00
parent 7f659817ee
commit 037746e5cb
2 changed files with 21 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
<!-- dashboard_nav is rendered by the layout via renderTemplate to avoid unresolved Promise output -->
<div class="max-w-3xl mx-auto p-6">
<div class="max-w-3xl mx-auto p-6">
<div class="relative flex justify-center">
<% if (!selectedGuild) { %>
<!-- Centered logo + selection card to match mock -->
@@ -12,6 +12,11 @@
</div>
</div>
<!-- Mobile CTA: open server list sheet when no guild selected -->
<div class="md:hidden text-center mt-8">
<button id="openMobileGuildList" class="px-4 py-2 rounded-md bg-slate-700 text-white">Seleccionar servidor</button>
</div>
<div class="w-full max-w-lg">
<div class="mx-auto backdrop-blur-md bg-white/6 rounded-xl p-6 shadow-xl glass-card">
<!-- user header inside card -->

View File

@@ -154,6 +154,20 @@
})();
</script>
<script>
// Bind the mobile CTA (if present) to open the mobile guild modal
document.addEventListener('DOMContentLoaded', () => {
const openBtn = document.getElementById('openMobileGuildList');
const mobileGuildModal = document.getElementById('mobileGuildModal');
if (openBtn && mobileGuildModal) {
openBtn.addEventListener('click', (e) => {
e.preventDefault();
mobileGuildModal.classList.remove('hidden');
});
}
});
</script>
<!-- Mobile modals -->
<div id="mobileGuildModal" class="fixed inset-0 bg-black/60 hidden z-50">
<div class="fixed inset-x-0 bottom-0 bg-[#1f2933] rounded-t-xl p-4 max-h-[80vh] overflow-auto" style="margin:0;">