Refactor player count calculations to exclude bot counts for accurate statistics
All checks were successful
CI - Build and Push / Build and Push Docker Image (push) Successful in 11s

This commit is contained in:
2025-10-06 19:02:23 +08:00
parent 828d45001f
commit 83630ffe51
3 changed files with 8 additions and 8 deletions

View File

@@ -264,7 +264,7 @@ function Servers() {
fontWeight: 'bold',
color: 'var(--text-primary)'
}}>
{server.status === 'online' ? `${server.playerCount - server.botCount}/${server.maxPlayers}` : 'Loading...'}
{server.status === 'online' ? `${server.playerCount}/${server.maxPlayers}` : 'Loading...'}
</div>
</div>
<div>
@@ -380,7 +380,7 @@ function Servers() {
color: 'var(--accent-primary)',
marginBottom: '0.5rem'
}}>
{servers.reduce((sum, s) => sum + (s.status === 'online' ? (s.playerCount - s.botCount) : 0), 0)}
{servers.reduce((sum, s) => sum + (s.status === 'online' ? s.playerCount : 0), 0)}
</div>
<div style={{
color: 'var(--text-secondary)',