feat: Añadir botón móvil para seleccionar servidor y vincularlo al modal correspondiente
This commit is contained in:
@@ -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 -->
|
||||
|
||||
@@ -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;">
|
||||
|
||||
Reference in New Issue
Block a user