improve game info box
parent
3288b7e14a
commit
b221d519ff
|
@ -20,7 +20,7 @@ final class Featured(
|
|||
|
||||
import Featured._
|
||||
|
||||
def one: Future[Option[DbGame]] =
|
||||
def one: Future[Option[DbGame]] =
|
||||
actor ? GetOne mapTo manifest[Option[DbGame]]
|
||||
|
||||
private implicit val timeout = Timeout(2 seconds)
|
||||
|
@ -49,10 +49,9 @@ final class Featured(
|
|||
|
||||
private def valid(game: DbGame) = game.isBeingPlayed
|
||||
|
||||
private def feature: Option[DbGame] =
|
||||
Featured.best(
|
||||
gameRepo.featuredCandidates.unsafePerformIO filter valid
|
||||
)
|
||||
private def feature: Option[DbGame] = Featured best {
|
||||
gameRepo.featuredCandidates.unsafePerformIO filter valid
|
||||
}
|
||||
}))
|
||||
|
||||
Akka.system.scheduler.schedule(5.seconds, 2.seconds, actor, GetOne)
|
||||
|
|
|
@ -10,18 +10,25 @@
|
|||
@game.updatedAt.map(showDate)
|
||||
}
|
||||
<br /><br />
|
||||
@if(game.finishedOrAborted) {
|
||||
@gameEndStatus(game),
|
||||
@game.winner.map { winner =>
|
||||
@winner.color.fold(trans.whiteIsVictorious(), trans.blackIsVictorious())
|
||||
}
|
||||
<br /><br />
|
||||
}
|
||||
@List(opponent, player).map { p =>
|
||||
<div class="player">
|
||||
@playerLink(p, withOnline = false, withDiff = true, cssClass = Some("s16 " + p.color.name))
|
||||
</div>
|
||||
}
|
||||
<br />
|
||||
@if(game.variant.exotic) {
|
||||
@trans.variant(): @variantName(game.variant).capitalize<br />
|
||||
}
|
||||
<span class="s16 clock">@shortClockName(game.clock)</span>
|
||||
@if(game.variant.exotic) {
|
||||
, @variantName(game.variant).capitalize
|
||||
}
|
||||
@if(game.rated) {
|
||||
<br />@trans.thisGameIsRated()<br />
|
||||
, @trans.rated()<br />
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
|
2
todo
2
todo
|
@ -37,3 +37,5 @@ propagate IP ban to the user
|
|||
verify firewall cookie is persistent
|
||||
admin ip search interface
|
||||
analyse: show main line for every move http://en.lichess.org/forum/lichess-feedback/about-the-analysis-feature#5
|
||||
show victory in analysis page + other suggestions http://en.lichess.org/forum/lichess-feedback/a-couple-of-feature-requests#2
|
||||
only one stockfish instance for moves and analysis. Use a todo with two queues.
|
||||
|
|
Loading…
Reference in New Issue