mejoras de UI

This commit is contained in:
2025-08-28 03:00:56 -06:00
parent 318a7847b8
commit 16d8e64fcd
3 changed files with 141 additions and 29 deletions

View File

@@ -921,8 +921,8 @@ function downloadJSON() {
</script>
<style scoped>
/* Light theme aligned with PlayerStats/GameEndModal */
.leaderboard.light { min-height: 100vh; padding: 20px; background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 100%); color:#0f172a; display:flex; flex-direction:column; }
/* Light theme aligned with other pages (UUID selector, lobby, game) */
.leaderboard.light { min-height: 100vh; padding: 20px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color:#0f172a; display:flex; flex-direction:column; }
.glass.light { background: rgba(255, 255, 255, 0.78); border: 1px solid rgba(229, 231, 235, 0.9); box-shadow: 0 18px 50px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.6); backdrop-filter: blur(18px) saturate(120%); -webkit-backdrop-filter: blur(18px) saturate(120%); border-radius: 16px; }

View File

@@ -30,14 +30,28 @@
v-for="(uuidInfo, index) in filteredUuids"
:key="uuidInfo.uuid"
class="uuid-card"
:class="{ 'has-name': uuidInfo.hasName }"
:class="{
'has-name': uuidInfo.hasName,
'has-color': !!uuidInfo.color,
'has-shame': uuidInfo.shameTokens && uuidInfo.shameTokens > 0
}"
@click="selectUuid(uuidInfo.uuid)"
@contextmenu.prevent="showContextMenu($event, uuidInfo)"
:style="{ animationDelay: `${index * 0.02}s` }"
:style="{
animationDelay: `${index * 0.02}s`,
'--player-color': uuidInfo.color || '#667eea'
}"
>
<div class="uuid-number">{{ getUuidIndex(uuidInfo.uuid) }}</div>
<div v-if="uuidInfo.shameTokens && uuidInfo.shameTokens > 0" class="shame-indicator" :title="`Vergüenza: ${uuidInfo.shameTokens}`">
<span class="shame-icon">😶</span>
<span v-if="uuidInfo.shameTokens > 1" class="shame-count">{{ uuidInfo.shameTokens }}</span>
</div>
<div class="uuid-number" :style="uuidInfo.color ? { color: uuidInfo.color } : {}">
{{ getUuidIndex(uuidInfo.uuid) }}
</div>
<div v-if="uuidInfo.name" class="player-name">{{ uuidInfo.name }}</div>
<div class="uuid-text">{{ formatUuid(uuidInfo.uuid) }}</div>
<div v-if="uuidInfo.color" class="color-indicator" :style="{ background: uuidInfo.color }"></div>
</div>
</div>
@@ -120,6 +134,8 @@ interface UuidInfo {
uuid: string;
name: string | null;
hasName: boolean;
color?: string | null;
shameTokens?: number;
}
const router = useRouter();
@@ -679,9 +695,9 @@ async function copyToClipboard() {
.uuids-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
gap: 15px;
margin-bottom: 30px;
grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
gap: 14px;
margin-bottom: 25px;
max-height: 500px;
overflow-y: auto;
padding: 10px;
@@ -707,8 +723,8 @@ async function copyToClipboard() {
.uuid-card {
background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
padding: 20px;
border-radius: 12px;
padding: 16px 14px;
border-radius: 10px;
cursor: pointer;
transition: all 0.3s;
animation: fadeIn 0.5s ease-out backwards;
@@ -716,6 +732,9 @@ async function copyToClipboard() {
flex-direction: column;
align-items: center;
gap: 10px;
position: relative;
overflow: hidden;
min-height: 120px;
}
@keyframes fadeIn {
@@ -732,13 +751,6 @@ async function copyToClipboard() {
.uuid-card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.uuid-card:hover .uuid-number,
.uuid-card:hover .uuid-text,
.uuid-card:hover .player-name {
color: white;
}
.uuid-card.has-name {
@@ -746,34 +758,130 @@ async function copyToClipboard() {
border: 2px solid rgba(102, 126, 234, 0.3);
}
.uuid-card.has-name:hover {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border-color: transparent;
.uuid-card.has-color {
background: linear-gradient(135deg,
color-mix(in srgb, var(--player-color) 8%, #f5f7fa) 0%,
color-mix(in srgb, var(--player-color) 15%, #c3cfe2) 100%);
border: 2px solid color-mix(in srgb, var(--player-color) 30%, transparent);
box-shadow: 0 4px 12px color-mix(in srgb, var(--player-color) 20%, transparent);
}
.uuid-card.has-color:hover {
box-shadow: 0 10px 25px color-mix(in srgb, var(--player-color) 35%, transparent);
}
.color-indicator {
position: absolute;
top: 0;
left: 0;
right: 0;
height: 4px;
background: var(--player-color);
opacity: 0.8;
transition: all 0.3s ease;
}
.uuid-card:hover .color-indicator {
height: 6px;
opacity: 1;
}
.shame-indicator {
position: absolute;
top: 8px;
right: 8px;
background: #fee2e2;
color: #b91c1c;
border: 1px solid #fecaca;
border-radius: 999px;
padding: 4px 8px;
display: flex;
align-items: center;
gap: 4px;
font-weight: 800;
font-size: 12px;
box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
z-index: 10;
transition: all 0.3s ease;
}
.shame-indicator:hover {
transform: scale(1.1);
box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}
.shame-icon {
font-size: 14px;
}
.shame-count {
font-size: 11px;
background: #dc2626;
color: white;
padding: 0 5px;
border-radius: 999px;
min-width: 18px;
text-align: center;
}
.uuid-card.has-shame {
border: 2px solid #fecaca;
background: linear-gradient(135deg,
color-mix(in srgb, #fee2e2 50%, #f5f7fa) 0%,
color-mix(in srgb, #fecaca 30%, #c3cfe2) 100%);
}
.uuid-card.has-shame.has-color {
background: linear-gradient(135deg,
color-mix(in srgb, var(--player-color) 8%, color-mix(in srgb, #fee2e2 40%, #f5f7fa)) 0%,
color-mix(in srgb, var(--player-color) 15%, color-mix(in srgb, #fecaca 30%, #c3cfe2)) 100%);
border: 2px solid color-mix(in srgb, #ef4444 40%, var(--player-color) 60%);
}
.uuid-number {
font-size: 24px;
font-size: 22px;
font-weight: bold;
color: #667eea;
transition: color 0.3s;
transition: all 0.3s;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
line-height: 1;
margin: 0;
}
.uuid-card.has-color .uuid-number {
font-weight: 900;
text-shadow: 0 1px 3px color-mix(in srgb, var(--player-color) 30%, transparent);
}
.player-name {
font-size: 16px;
font-size: 14px;
font-weight: 600;
color: #333;
transition: color 0.3s;
padding: 4px 8px;
transition: all 0.3s;
padding: 3px 8px;
background: rgba(255, 255, 255, 0.5);
border-radius: 8px;
margin: 4px 0;
border-radius: 6px;
margin: 2px 0;
line-height: 1.2;
text-align: center;
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.uuid-card.has-color .player-name {
background: color-mix(in srgb, var(--player-color) 15%, rgba(255, 255, 255, 0.8));
border: 1px solid color-mix(in srgb, var(--player-color) 25%, transparent);
font-weight: 700;
}
.uuid-text {
font-family: 'Monaco', 'Menlo', monospace;
font-size: 12px;
font-size: 11px;
color: #666;
transition: color 0.3s;
opacity: 0.8;
}
.loading {