feat(dashboard): show round info and results for active and finished games
Some checks failed
CI/CD - Francia Ocupada (La Resistencia) / build-and-deploy (push) Failing after 10s

This commit is contained in:
Resistencia Dev
2025-12-22 23:03:31 +01:00
parent 1ad4f46aa4
commit c4c08c64c3
4 changed files with 50 additions and 6 deletions

View File

@@ -250,6 +250,11 @@ export default function Dashboard() {
<div className={`px-3 py-1 rounded text-[10px] font-black uppercase tracking-widest border ${game.status === 'WAITING' ? 'bg-orange-500/10 text-orange-500 border-orange-500/20' : 'bg-green-500/10 text-green-500 border-green-500/20'}`}>
{game.status}
</div>
{game.currentRound > 0 && (
<div className="bg-white/10 px-3 py-1 rounded text-[10px] font-black uppercase tracking-widest border border-white/10">
Ronda {game.currentRound}
</div>
)}
<ChevronDown
size={20}
className={`text-gray-500 transition-transform duration-300 ${expandedGames.has(game.id) ? 'rotate-180' : ''}`}
@@ -383,6 +388,26 @@ export default function Dashboard() {
<span>AGENTES:</span>
<span className="text-gray-300">{entry.players.split(',').length}</span>
</div>
{entry.rounds_played > 0 && (
<>
<div className="flex justify-between">
<span>RONDAS:</span>
<span className="text-gray-300">{entry.rounds_played}</span>
</div>
<div className="flex justify-between items-center pt-2">
<span>RESULTADOS:</span>
<div className="flex gap-1">
{entry.round_results && entry.round_results.split(',').map((res: string, idx: number) => (
<div
key={idx}
className={`w-3 h-3 rounded-full ${res === 'true' ? 'bg-blue-500' : 'bg-red-500'}`}
title={res === 'true' ? 'Victoria Resistencia' : 'Victoria Espías'}
/>
))}
</div>
</div>
</>
)}
{entry.players && (
<div className="pt-2 border-t border-white/5 mt-2">
<p className="mb-1 opacity-50">PARTICIPANTES:</p>