remove elo (#1304)
This commit is contained in:
@@ -101,8 +101,9 @@
|
||||
font-weight: 700;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
.sq-winner { color: #90EE90; text-shadow: 0 0 10px rgba(144, 238, 144, 0.3); font-family: 'skyquakesymbols', 'Inter', sans-serif; }
|
||||
.sq-loser { color: rgba(255, 255, 255, 0.7); font-family: 'skyquakesymbols', 'Inter', sans-serif; }
|
||||
.sq-winner { color: #90EE90; text-shadow: 0 0 10px rgba(144, 238, 144, 0.3); font-family: 'skyquakesymbols', 'Inter', sans-serif; text-decoration: none; }
|
||||
.sq-loser { color: rgb(255, 100, 100); text-shadow: 0 0 10px rgba(255, 100, 100, 0.25); font-family: 'skyquakesymbols', 'Inter', sans-serif; text-decoration: none; }
|
||||
.sq-winner:hover, .sq-loser:hover { text-decoration: underline; text-underline-offset: 0.15em; }
|
||||
.sq-vs { color: rgba(255, 255, 255, 0.4); font-size: 1rem; font-weight: 400; }
|
||||
.match-meta {
|
||||
display: flex;
|
||||
@@ -643,9 +644,9 @@
|
||||
<div class="match-type-badge" id="matchTypeBadge"></div>
|
||||
<div class="match-map-name" id="matchMapName"></div>
|
||||
<div class="match-squadrons">
|
||||
<span class="sq-winner" id="sqWinner"></span>
|
||||
<a class="sq-winner" id="sqWinner"></a>
|
||||
<span class="sq-vs">VS</span>
|
||||
<span class="sq-loser" id="sqLoser"></span>
|
||||
<a class="sq-loser" id="sqLoser"></a>
|
||||
</div>
|
||||
<div class="match-meta" id="matchMeta"></div>
|
||||
</div>
|
||||
@@ -832,6 +833,12 @@
|
||||
return `/MAPS/${fileName}.jpg`;
|
||||
}
|
||||
|
||||
function squadronHref(team, fallbackName) {
|
||||
if (team?.clan_id != null && team.clan_id !== '') return `/squadrons/${encodeURIComponent(String(team.clan_id))}`;
|
||||
const name = fallbackName || team?.squadron || team?.squadron_tagged || '';
|
||||
return name ? `/squadrons/${encodeURIComponent(name)}` : '/squadrons';
|
||||
}
|
||||
|
||||
function renderTeamTable(players, isWinner) {
|
||||
const sorted = [...players].sort((a, b) => (b.score || 0) - (a.score || 0));
|
||||
return sorted.map(player => {
|
||||
@@ -942,8 +949,12 @@
|
||||
const TYPE_LABELS = { sqb: __t('live.squadronBattle'), rb: __t('live.randomBattle') };
|
||||
document.getElementById('matchTypeBadge').textContent = TYPE_LABELS[match.game_type] || match.game_type || 'Match';
|
||||
document.getElementById('matchMapName').textContent = cleanMapName;
|
||||
document.getElementById('sqWinner').textContent = match.winning_tag || match.winning_squadron || 'Unknown';
|
||||
document.getElementById('sqLoser').textContent = match.losing_tag || match.losing_squadron || 'Unknown';
|
||||
const winnerEl = document.getElementById('sqWinner');
|
||||
const loserEl = document.getElementById('sqLoser');
|
||||
winnerEl.textContent = match.winning_tag || match.winning_squadron || 'Unknown';
|
||||
winnerEl.href = squadronHref(match.winning_team, match.winning_squadron);
|
||||
loserEl.textContent = match.losing_tag || match.losing_squadron || 'Unknown';
|
||||
loserEl.href = squadronHref(match.losing_team, match.losing_squadron);
|
||||
|
||||
// Meta
|
||||
const endTime = match.endtime_iso ? new Date(match.endtime_iso).toISOString().replace('T', ' ').substring(0, 16) + ' UTC' : 'Unknown';
|
||||
@@ -997,8 +1008,9 @@
|
||||
// Add duration/mode to meta
|
||||
const metaEl = document.getElementById('matchMeta');
|
||||
if (replay.duration) {
|
||||
const mins = Math.floor(replay.duration / 60);
|
||||
const secs = replay.duration % 60;
|
||||
const durationSeconds = Math.max(0, Math.round(Number(replay.duration) || 0));
|
||||
const mins = Math.floor(durationSeconds / 60);
|
||||
const secs = durationSeconds % 60;
|
||||
metaEl.innerHTML += `<span class="match-meta-item"><i class="fas fa-hourglass-half"></i>${mins}m ${secs}s</span>`;
|
||||
}
|
||||
if (replay.mode) {
|
||||
|
||||
Reference in New Issue
Block a user