include elite & marathon winners in embedded leaderboards
This commit is contained in:
parent
61615f9883
commit
86d9504a1b
|
@ -24,7 +24,7 @@ lichess.StrongSocket.defaults.events.reload = app.update;
|
|||
<a href="@routes.Tournament.leaderboard">@trans.leaderboard()</a>
|
||||
</h2>
|
||||
<ul class="tournament_leaderboard">
|
||||
@winners.top.take(10).map { w =>
|
||||
@winners.top.map { w =>
|
||||
<li>
|
||||
@userIdLink(w.userId.some)
|
||||
<a title="@w.tourName" href="@routes.Tournament.show(w.tourId)">@scheduledTournamentNameShortHtml(w.tourName)</a>
|
||||
|
|
|
@ -38,12 +38,13 @@ case class AllWinners(
|
|||
marathon: List[Winner],
|
||||
variants: Map[String, FreqWinners]) {
|
||||
|
||||
lazy val top: List[Winner] = {
|
||||
List(hyperbullet, bullet, superblitz, blitz, classical) :::
|
||||
WinnersApi.variants.flatMap { v =>
|
||||
variants get v.key
|
||||
}
|
||||
}.flatMap(_.top)
|
||||
lazy val top: List[Winner] = List(
|
||||
List(hyperbullet, bullet, superblitz, blitz, classical).flatMap(_.top),
|
||||
List(elite.headOption, marathon.headOption).flatten,
|
||||
WinnersApi.variants.flatMap { v =>
|
||||
variants get v.key flatMap (_.top)
|
||||
}
|
||||
).flatten
|
||||
}
|
||||
|
||||
final class WinnersApi(
|
||||
|
|
|
@ -730,7 +730,7 @@ div.faq_box {
|
|||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
justify-content: space-between;
|
||||
line-height: 2.2em;
|
||||
line-height: 2em;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.tournament_leaderboard a.user_link {
|
||||
|
|
Loading…
Reference in a new issue