feat: Ajustar la visibilidad del menú de usuario en dispositivos móviles y evitar duplicación de la opción de cierre de sesión

This commit is contained in:
Shni
2025-10-15 02:45:43 -05:00
parent dd05824d7a
commit 1307f7326a
2 changed files with 6 additions and 5 deletions

View File

@@ -27,7 +27,8 @@
<span class="text-white font-medium"><%= user?.username || 'User' %></span>
<svg class="w-3 h-3 text-white/80" viewBox="0 0 20 20" fill="none"><path d="M6 8l4 4 4-4" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/></svg>
</button>
<div id="cardUserMenu" class="absolute right-0 mt-2 w-36 bg-white/6 backdrop-blur rounded-md p-2 hidden">
<div id="cardUserMenu" class="absolute right-0 mt-2 w-36 bg-white/6 backdrop-blur rounded-md p-2 hidden md:block">
<!-- Hidden on mobile because the mobile sheet handles user actions -->
<a href="/auth/logout" class="block px-3 py-2 text-sm text-rose-300 hover:bg-white/5 rounded">Log out</a>
</div>
</div>

View File

@@ -159,10 +159,10 @@
<div id="mobileUserSheet" class="fixed inset-0 bg-black/60 hidden z-50">
<div class="absolute bottom-0 left-0 right-0 bg-[#1f2933] rounded-t-xl p-4">
<h3 class="text-white font-medium mb-3">User settings</h3>
<a href="/dashboard/select-guild" class="block py-2 text-white">Servers</a>
<a href="/auth/logout" class="block py-2 text-rose-300">Log out</a>
<div class="text-right mt-2"><button id="mobileUserClose" class="text-white/70">Cerrar</button></div>
<h3 class="text-white font-medium mb-3">User settings</h3>
<a href="/dashboard/select-guild" class="block py-2 text-white">Servers</a>
<!-- Log out is available in the user card/menu so we avoid duplicating it here -->
<div class="text-right mt-2"><button id="mobileUserClose" class="text-white/70">Cerrar</button></div>
</div>
</div>