update dashboard
This commit is contained in:
@@ -168,6 +168,13 @@ struct StatsController: RouteCollection {
|
||||
sortOrder = -79
|
||||
backgroundColor = colors.first(where: {$0.gameId == "bocw"})?.tileColour ?? backgroundColor
|
||||
}
|
||||
else if statisticItem.codTrackerId == "vg_competitive"{
|
||||
title2 = "Ratio"
|
||||
content1 = "\(statisticItem.wins)-\(statisticItem.losses)"
|
||||
content2 = Utils.getRatio(wins: statisticItem.wins, losses: statisticItem.losses)
|
||||
sortOrder = -81
|
||||
backgroundColor = colors.first(where: {$0.gameId == "vg"})?.tileColour ?? backgroundColor
|
||||
}
|
||||
|
||||
|
||||
else {
|
||||
@@ -691,6 +698,7 @@ struct StatsController: RouteCollection {
|
||||
var mwFivePlayers:Stats?
|
||||
var overallFourPlayers:Stats?
|
||||
var blackOpsColdWarNuketownHalloween:Stats?
|
||||
var vgCompetitive:StatsWithMostRecentDailyRecord?
|
||||
|
||||
|
||||
|
||||
@@ -752,6 +760,17 @@ struct StatsController: RouteCollection {
|
||||
}
|
||||
|
||||
|
||||
group.enter()
|
||||
queue.async {
|
||||
|
||||
vgCompetitive = self.getStatsWithMostRecentDailyRecord(sortedMatches: matches.filter({ (match) -> Bool in
|
||||
return match.codGame == "vg" && self.shouldCountMatch(match: match )
|
||||
}))
|
||||
|
||||
|
||||
group.leave()
|
||||
}
|
||||
|
||||
group.wait()
|
||||
|
||||
return [
|
||||
@@ -769,6 +788,8 @@ struct StatsController: RouteCollection {
|
||||
"casual_overall":Stats(totalWins: casualOverall.totalWins, totalLosses: casualOverall.totalLosses),
|
||||
"bocw_casual":Stats(totalWins: bocwCasual.totalWins, totalLosses: bocwCasual.totalLosses),
|
||||
"vg_casual":Stats(totalWins: vgCasual.totalWins, totalLosses: vgCasual.totalLosses),
|
||||
"vg_competitive":Stats(totalWins: vgCompetitive!.totalWins, totalLosses: vgCompetitive!.totalLosses),
|
||||
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user