prioritize current games
This commit is contained in:
parent
31c99baf1e
commit
2257a463b3
|
@ -1,6 +1,6 @@
|
|||
@(povs: List[Pov])(implicit ctx: Context)
|
||||
|
||||
@povs.sortBy(pov => pov.remainingSeconds | (99999999 - pov.isMyTurn.fold(1, 0))).map { pov =>
|
||||
@povs.sortBy(Pov.priority).map { pov =>
|
||||
<a href="@routes.Round.player(pov.fullId)" class="@if(pov.isMyTurn){my_turn}">
|
||||
@gameFen(pov.game, pov.color, withLink = false, withTitle = false)
|
||||
<span class="meta">
|
||||
|
|
|
@ -51,6 +51,11 @@ object Pov {
|
|||
|
||||
def apply(game: Game, user: lila.user.User): Option[Pov] =
|
||||
game player user map { apply(game, _) }
|
||||
|
||||
def priority(pov: Pov) =
|
||||
if (pov.isMyTurn) pov.remainingSeconds.getOrElse(Int.MaxValue - 1)
|
||||
else Int.MaxValue
|
||||
|
||||
}
|
||||
|
||||
case class PovRef(gameId: String, color: Color) {
|
||||
|
|
|
@ -1179,7 +1179,7 @@ div.table_wrap > .clock > .time {
|
|||
font-family: monospace;
|
||||
}
|
||||
div.table_wrap > .correspondence.clock > .time {
|
||||
font-size: 21px;
|
||||
font-size: 20px;
|
||||
}
|
||||
div.table_wrap > .clock .time span {
|
||||
font-size: 80%;
|
||||
|
|
Loading…
Reference in a new issue