feat: Actualizar la lógica de visibilidad de los bots en la lista de servidores

This commit is contained in:
Shni
2025-10-15 03:35:53 -05:00
parent ac2eb5bdb5
commit 32bcc5f121
2 changed files with 3 additions and 3 deletions

View File

@@ -44,7 +44,7 @@
<div id="cardList" class="max-h-72 overflow-auto rounded"> <div id="cardList" class="max-h-72 overflow-auto rounded">
<% if (guilds && guilds.length) { %> <% if (guilds && guilds.length) { %>
<% guilds.sort((a,b)=> a.name.localeCompare(b.name)).forEach(g => { %> <% guilds.sort((a,b)=> a.name.localeCompare(b.name)).forEach(g => { %>
<div class="p-3 cursor-pointer hover:bg-white/5 flex items-center justify-between text-white <%= (typeof g.botInGuild === 'boolean' && !g.botInGuild) ? 'opacity-60' : '' %>" data-id="<%= g.id %>" data-bot="<%= (typeof g.botInGuild === 'boolean' && g.botInGuild) ? '1' : '0' %>" data-invite="https://discord.com/oauth2/authorize?client_id=991062751633883136&permissions=2416176272&integration_type=0&scope=bot&guild_id=<%= g.id %>"> <div class="p-3 cursor-pointer hover:bg-white/5 flex items-center justify-between text-white <%= (g.botInGuild === false) ? 'opacity-60' : '' %>" data-id="<%= g.id %>" data-bot="<%= (g.botInGuild === false) ? '0' : '1' %>" data-invite="https://discord.com/oauth2/authorize?client_id=991062751633883136&permissions=2416176272&integration_type=0&scope=bot&guild_id=<%= g.id %>">
<div class="flex items-center gap-3"> <div class="flex items-center gap-3">
<% if (g.icon) { %> <% if (g.icon) { %>
<img src="https://cdn.discordapp.com/icons/<%= g.id %>/<%= g.icon %>.webp" 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">

View File

@@ -24,7 +24,7 @@
<div id="miniGuildList" class="origin-top-left absolute top-full left-0 mt-2 w-56 bg-white/80 backdrop-blur-md rounded-lg p-1 hidden transition-transform duration-150 z-50" style="max-height:18rem; overflow:auto; background-color: rgba(12,15,18,0.92);"> <div id="miniGuildList" class="origin-top-left absolute top-full left-0 mt-2 w-56 bg-white/80 backdrop-blur-md rounded-lg p-1 hidden transition-transform duration-150 z-50" style="max-height:18rem; overflow:auto; background-color: rgba(12,15,18,0.92);">
<% if (guilds && guilds.length) { %> <% if (guilds && guilds.length) { %>
<% guilds.forEach(g => { %> <% guilds.forEach(g => { %>
<div class="p-1 rounded-md hover:bg-white/5 cursor-pointer text-white guild-item flex items-center gap-3 <%= (typeof g.botInGuild === 'boolean' && !g.botInGuild) ? 'opacity-60' : '' %>" data-id="<%= g.id %>" data-bot="<%= (typeof g.botInGuild === 'boolean' && g.botInGuild) ? '1' : '0' %>" data-invite="https://discord.com/oauth2/authorize?client_id=991062751633883136&permissions=2416176272&integration_type=0&scope=bot&guild_id=<%= g.id %>"> <div class="p-1 rounded-md hover:bg-white/5 cursor-pointer text-white guild-item flex items-center gap-3 <%= (g.botInGuild === false) ? 'opacity-60' : '' %>" data-id="<%= g.id %>" data-bot="<%= (g.botInGuild === false) ? '0' : '1' %>" data-invite="https://discord.com/oauth2/authorize?client_id=991062751633883136&permissions=2416176272&integration_type=0&scope=bot&guild_id=<%= g.id %>">
<% if (g.icon) { %> <% if (g.icon) { %>
<img src="https://cdn.discordapp.com/icons/<%= g.id %>/<%= g.icon %>.webp" 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 { %> <% } else { %>
@@ -198,7 +198,7 @@
<div id="mobileGuildList" class="space-y-2"> <div id="mobileGuildList" class="space-y-2">
<% if (guilds && guilds.length) { %> <% if (guilds && guilds.length) { %>
<% guilds.forEach(g => { %> <% guilds.forEach(g => { %>
<div class="flex items-center gap-3 p-2 rounded-md hover:bg-white/5 cursor-pointer" data-id="<%= g.id %>"> <div class="flex items-center gap-3 p-2 rounded-md hover:bg-white/5 cursor-pointer <%= (g.botInGuild === false) ? 'opacity-60' : '' %>" data-id="<%= g.id %>" data-bot="<%= (g.botInGuild === false) ? '0' : '1' %>" data-invite="https://discord.com/oauth2/authorize?client_id=991062751633883136&permissions=2416176272&integration_type=0&scope=bot&guild_id=<%= g.id %>">
<% if (g.icon) { %> <% if (g.icon) { %>
<img src="https://cdn.discordapp.com/icons/<%= g.id %>/<%= g.icon %>.webp" 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 { %> <% } else { %>