fix alliance name
This commit is contained in:
@@ -173,12 +173,20 @@ window.renderTownDetails = function() {
|
||||
const godName = t.god ? t.god.charAt(0).toUpperCase() + t.god.slice(1) : 'Κανένας';
|
||||
const seaStr = t.sea != null ? `Θ${t.sea}` : '—';
|
||||
const coordStr = (t.x != null && t.y != null) ? ` (${Math.round(t.x)}:${Math.round(t.y)})` : '';
|
||||
|
||||
let allianceHtml = '';
|
||||
if (t.alliance_name) {
|
||||
allianceHtml = `<div>Συμμαχία: <strong style="color:#c8a44a">${t.alliance_name}</strong></div>`;
|
||||
} else if (t.alliance_id) {
|
||||
allianceHtml = `<div>Συμμαχία: ID <strong style="color:#aaa">${t.alliance_id}</strong></div>`;
|
||||
}
|
||||
|
||||
document.getElementById('td-general').innerHTML = `
|
||||
<div>Πόντοι: <strong>${t.points}</strong>${t.wonder_points ? ` / Θαύμα: <strong>${t.wonder_points}</strong>` : ''}</div>
|
||||
<div>Θεός: <strong>${godName}</strong></div>
|
||||
<div>Θάλασσα: <strong style="color:#6fcfcf">${seaStr}</strong><span style="color:#666;font-size:0.72rem">${coordStr}</span></div>
|
||||
<div>Παίκτης: <strong style="color:#aaa">${t.player}</strong>${t.has_premium ? ' <span style="color:#c8a44a" title="Premium">★</span>' : ''}</div>
|
||||
${t.alliance_id ? `<div>Συμμαχία: <strong style="color:#aaa">${t.alliance_id}</strong></div>` : ''}
|
||||
${allianceHtml}
|
||||
`;
|
||||
|
||||
// ---- Researches ----
|
||||
|
||||
Reference in New Issue
Block a user