feat: Cambiar las imágenes de avatar e íconos a formato WebP y ajustar el menú de usuario en el panel de control

This commit is contained in:
Shni
2025-10-15 02:50:47 -05:00
parent 1307f7326a
commit f3d69ed3c8
2 changed files with 27 additions and 6 deletions

View File

@@ -26,7 +26,7 @@
<% guilds.forEach(g => { %>
<div class="p-1 rounded-md hover:bg-white/5 cursor-pointer text-white guild-item flex items-center gap-3" data-id="<%= g.id %>">
<% if (g.icon) { %>
<img src="https://cdn.discordapp.com/icons/<%= g.id %>/<%= g.icon %>.png" class="w-5 h-5 rounded-full" alt="icon">
<img src="https://cdn.discordapp.com/icons/<%= g.id %>/<%= g.icon %>.webp" class="w-5 h-5 rounded-full" alt="icon">
<% } else { %>
<div class="w-5 h-5 rounded-full bg-white/8 flex items-center justify-center text-xs text-white">S</div>
<% } %>
@@ -50,7 +50,7 @@
<% } %>
<svg class="w-3 h-3 text-white/80 ml-1" 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="userMenu" class="origin-top-right absolute right-0 mt-2 w-36 bg-white/80 backdrop-blur-md rounded-md p-2 hidden z-50" style="background-color: rgba(12,15,18,0.9);">
<div id="userMenu" class="origin-top-right absolute right-0 mt-2 w-36 bg-white/80 backdrop-blur-md rounded-md p-2 hidden md:block z-50" style="background-color: rgba(12,15,18,0.9);">
<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>
@@ -143,7 +143,7 @@
<% guilds.forEach(g => { %>
<div class="flex items-center gap-3 p-2 rounded-md hover:bg-white/5 cursor-pointer" data-id="<%= g.id %>">
<% if (g.icon) { %>
<img src="https://cdn.discordapp.com/icons/<%= g.id %>/<%= g.icon %>.png" class="w-8 h-8 rounded-full" alt="icon">
<img src="https://cdn.discordapp.com/icons/<%= g.id %>/<%= g.icon %>.webp" class="w-8 h-8 rounded-full" alt="icon">
<% } else { %>
<div class="w-8 h-8 rounded-full bg-white/8"></div>
<% } %>
@@ -161,7 +161,7 @@
<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>
<!-- Log out is available in the user card/menu so we avoid duplicating it here -->
<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>
</div>
</div>