feat: historique combat enrichi — loot affiché + 10 entrées
All checks were successful
CI/CD — Build & Deploy / Build & Deploy (push) Successful in 33s
All checks were successful
CI/CD — Build & Deploy / Build & Deploy (push) Successful in 33s
- Ajout loot_material_id + loot_quantity sur combat_logs
- Historique passe de 5 à 10 entrées
- Affichage loot (🎁×N) dans l'historique récent
- Fix scope variables multi-combat loot tracking
This commit is contained in:
@@ -131,7 +131,10 @@ function HistoryEntry({ h }: { h: CombatLog }) {
|
||||
{h.winner === 'player' ? '✓' : '✗'} {h.monster.name}
|
||||
</span>
|
||||
<span style={{ color: '#6b7a99' }}>
|
||||
{h.winner === 'player' ? `+${h.xpEarned}xp +${h.goldEarned}or` : `${h.totalRounds} tours`}
|
||||
{h.winner === 'player'
|
||||
? `+${h.xpEarned}xp +${h.goldEarned}or${h.lootQuantity > 0 ? ` 🎁×${h.lootQuantity}` : ''}`
|
||||
: `${h.totalRounds} tours`
|
||||
}
|
||||
</span>
|
||||
</div>
|
||||
);
|
||||
@@ -333,7 +336,7 @@ export function CombatPage() {
|
||||
<Clock size={11} /> Historique récent
|
||||
</p>
|
||||
<div className="card" style={{ padding: '0.75rem' }}>
|
||||
{history.slice(0, 5).map(h => <HistoryEntry key={h.id} h={h} />)}
|
||||
{history.slice(0, 10).map(h => <HistoryEntry key={h.id} h={h} />)}
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user