diff --git a/app/game/Featured.scala b/app/game/Featured.scala index 3d350a2fdf..a60c60cab2 100644 --- a/app/game/Featured.scala +++ b/app/game/Featured.scala @@ -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) diff --git a/app/views/game/infoBox.scala.html b/app/views/game/infoBox.scala.html index 5468af360a..a5259d6dd6 100644 --- a/app/views/game/infoBox.scala.html +++ b/app/views/game/infoBox.scala.html @@ -10,18 +10,25 @@ @game.updatedAt.map(showDate) }

+ @if(game.finishedOrAborted) { + @gameEndStatus(game), + @game.winner.map { winner => + @winner.color.fold(trans.whiteIsVictorious(), trans.blackIsVictorious()) + } +

+ } @List(opponent, player).map { p =>
@playerLink(p, withOnline = false, withDiff = true, cssClass = Some("s16 " + p.color.name))
}
- @if(game.variant.exotic) { - @trans.variant(): @variantName(game.variant).capitalize
- } @shortClockName(game.clock) + @if(game.variant.exotic) { + , @variantName(game.variant).capitalize + } @if(game.rated) { -
@trans.thisGameIsRated()
+ , @trans.rated()
} diff --git a/todo b/todo index d0496ec7bc..8cf2b86e5d 100644 --- a/todo +++ b/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.