remove pools from homepage

This commit is contained in:
Thibault Duplessis 2014-10-12 17:56:02 +02:00
parent 6a944ec446
commit f42795e76a
3 changed files with 6 additions and 12 deletions

View file

@ -32,10 +32,10 @@ object Lobby extends LilaController {
tours = Env.tournament promotable true,
filter = Env.setup.filter
).map {
case (preload, entries, posts, tours, featured, lead, tWinners, puzzle, playing, pools, streams, nbRounds) =>
case (preload, entries, posts, tours, featured, lead, tWinners, puzzle, playing, streams, nbRounds) =>
val response = status(html.lobby.home(
Json stringify preload, entries, posts, tours, featured, lead, tWinners,
puzzle, playing, streams, Env.blog.lastPostCache.apply, pools, nbRounds
puzzle, playing, streams, Env.blog.lastPostCache.apply, nbRounds
))
// the session cookie is required for anon lobby filter storage
ctx.req.session.data.contains(LilaCookie.sessionId).fold(

View file

@ -12,7 +12,6 @@ import lila.forum.MiniForumPost
import lila.game.{ Game, GameRepo, Pov }
import lila.lobby.actorApi.GetOpen
import lila.lobby.{ Hook, HookRepo }
import lila.pool.Pool
import lila.rating.PerfType
import lila.setup.FilterConfig
import lila.socket.History
@ -32,10 +31,9 @@ final class Preload(
nowPlaying: (User, Int) => Fu[List[Pov]],
streamsOnAir: => () => Fu[List[StreamOnAir]],
dailyPuzzle: () => Fu[Option[lila.puzzle.DailyPuzzle]],
getPools: () => Fu[List[Pool]],
countRounds: () => Fu[Int]) {
private type Response = (JsObject, List[Entry], List[MiniForumPost], List[Enterable], Option[Game], List[(User, PerfType)], List[Winner], Option[lila.puzzle.DailyPuzzle], List[Pov], List[Pool], List[StreamOnAir], Int)
private type Response = (JsObject, List[Entry], List[MiniForumPost], List[Enterable], Option[Game], List[(User, PerfType)], List[Winner], Option[lila.puzzle.DailyPuzzle], List[Pov], List[StreamOnAir], Int)
def apply(
posts: Fu[List[MiniForumPost]],
@ -51,14 +49,12 @@ final class Preload(
dailyPuzzle() zip
(ctx.me ?? { nowPlaying(_, 3) }) zip
filter zip
getPools() zip
streamsOnAir() zip
countRounds() map {
case ((((((((((((hooks, posts), tours), feat), entries), lead), tWinners), puzzle), playing), filter), pools), streams), nbRounds) =>
case (((((((((((hooks, posts), tours), feat), entries), lead), tWinners), puzzle), playing), filter), streams), nbRounds) =>
(Json.obj(
"version" -> lobbyVersion(),
"pool" -> JsArray(hooks map (_.render)),
"filter" -> filter.render
), entries, posts, tours, feat, lead, tWinners, puzzle, playing, pools, streams, nbRounds)
), entries, posts, tours, feat, lead, tWinners, puzzle, playing, streams, nbRounds)
}
}

View file

@ -1,4 +1,4 @@
@(preload: String, userTimeline: List[lila.timeline.Entry], forumRecent: List[lila.forum.MiniForumPost], tours: List[lila.tournament.Enterable], featured: Option[Game], leaderboard: List[(User, lila.rating.PerfType)], tournamentWinners: List[lila.tournament.Winner], puzzle: Option[lila.puzzle.DailyPuzzle], playing: List[Pov], streams: List[lila.tv.StreamOnAir], lastPost: List[lila.blog.MiniPost], pools: List[lila.pool.Pool], nbRounds: Int)(implicit ctx: Context)
@(preload: String, userTimeline: List[lila.timeline.Entry], forumRecent: List[lila.forum.MiniForumPost], tours: List[lila.tournament.Enterable], featured: Option[Game], leaderboard: List[(User, lila.rating.PerfType)], tournamentWinners: List[lila.tournament.Winner], puzzle: Option[lila.puzzle.DailyPuzzle], playing: List[Pov], streams: List[lila.tv.StreamOnAir], lastPost: List[lila.blog.MiniPost], nbRounds: Int)(implicit ctx: Context)
@underchat = {
<div id="featured_game">
@ -67,13 +67,11 @@ openGraph = Map(
<div class="tabs">
<a data-tab="list" class="list">@trans.list()</a>
<a data-tab="graph" class="graph">@trans.graph()</a>
<a data-tab="pool" class="pool">Pools</a>
</div>
<a class="filter" href="@routes.Setup.filterForm()">
<span data-icon="D"> @trans.filterGames()</span>
<span class="number">(0)</span>
</a>
<div id="pool_list" class="tab pool none">@pool.homeList(pools)</div>
<div id="hooks_chart" class="tab graph none"><div class="canvas"></div></div>
<div id="hooks_list" class="tab list none">
<div class="table_wrap">