vstext wip
This commit is contained in:
parent
9bfb613931
commit
b958a7de7f
|
@ -28,7 +28,8 @@ object Game extends LilaController with BaseGame {
|
|||
}
|
||||
|
||||
def realtime = Open { implicit ctx ⇒
|
||||
GameRepo.featuredCandidates map lila.game.Featured.sort map (_ take 9) zip
|
||||
// GameRepo.featuredCandidates map lila.game.Featured.sort map (_ take 9) zip
|
||||
GameRepo.random(9) zip
|
||||
makeListMenu map {
|
||||
case (games, menu) ⇒ html.game.realtime(games, menu)
|
||||
}
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
@(g: Game)(implicit ctx: Context)
|
||||
@gameFen(g, g.creator.color)
|
||||
<div class="vstext">@usernameWithElo(g.creator) - @usernameWithElo(g.invited)</div>
|
||||
@game.vstext(g)
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
@(g: lila.game.Game)
|
||||
@gameFenNoCtx(g, g.creator.color)
|
||||
<div class="vstext">@usernameWithElo(g.creator) - @usernameWithElo(g.invited)</div>
|
||||
@game.vstext(g)
|
||||
|
|
|
@ -5,13 +5,10 @@ title = trans.gamesBeingPlayedRightNow.str(),
|
|||
menu = sideMenu(listMenu, "realtime").some) {
|
||||
<div style="padding-bottom: 0" class="content_box current_games_box">
|
||||
<div class="game_list realtime clearfix">
|
||||
@games.map { game =>
|
||||
@games.map { g =>
|
||||
<div>
|
||||
@gameFen(game, game.creator.color)
|
||||
<div class="vstext">
|
||||
@usernameWithElo(game.creator) - @usernameWithElo(game.invited)<br />
|
||||
@shortClockName(game.clock)
|
||||
</div>
|
||||
@gameFen(g, g.creator.color)
|
||||
@game.vstext(g)
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
|
6
app/views/game/vstext.scala.html
Normal file
6
app/views/game/vstext.scala.html
Normal file
|
@ -0,0 +1,6 @@
|
|||
@(g: Game)
|
||||
|
||||
<div class="vstext">
|
||||
@usernameWithElo(g.creator) - @usernameWithElo(g.invited)<br />
|
||||
@g.clock.map(shortClockName)
|
||||
</div>
|
|
@ -1,12 +1,10 @@
|
|||
@(games: List[Game])(implicit ctx: Context)
|
||||
|
||||
<div class="game_list realtime clearfix">
|
||||
@games.map { game =>
|
||||
@games.map { g =>
|
||||
<div>
|
||||
@gameFen(game, game.creator.color)
|
||||
<div class="vstext">
|
||||
@usernameWithElo(game.creator) - @usernameWithElo(game.invited)
|
||||
</div>
|
||||
@gameFen(g, g.creator.color)
|
||||
@game.vstext(g)
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
|
|
@ -214,6 +214,9 @@ object GameRepo {
|
|||
}
|
||||
}
|
||||
|
||||
def random(nb: Int): Fu[List[Game]] =
|
||||
$find($query(Json.obj("uids" -> $exists(true))) skip Random.nextInt(2000), nb)
|
||||
|
||||
// user1 wins, draws, losses
|
||||
def confrontation(user1: User, user2: User): Fu[(Int, Int, Int)] = {
|
||||
import reactivemongo.bson._
|
||||
|
|
7
todo
7
todo
|
@ -48,10 +48,5 @@ replace plot with watch plot when game starts
|
|||
team search is broken
|
||||
liquid UI for large screens http://fr.lichess.org/forum/lichess-feedback/hi-res#5
|
||||
customize piece images
|
||||
opera bug http://postimg.org/image/zcv8hse8n/full/
|
||||
customize sound notifications http://imgur.com/70WVyb5
|
||||
opera issue http://en.lichess.org/forum/lichess-feedback/new-game-wont-show-on-games-list-opera#1
|
||||
|
||||
deploy
|
||||
------
|
||||
db.report.ensureIndex({createdAt: -1, processedBy: 1})
|
||||
restyle under mini board infos
|
||||
|
|
Loading…
Reference in a new issue