@(pov: Pov, data: play.api.libs.json.JsObject, tour: Option[lila.tournament.TourMiniView], simul: Option[lila.simul.Simul], cross: Option[lila.game.Crosstable.WithMatchup], userTv: Option[User] = None, chatOption: Option[lila.chat.UserChat.Mine], bookmarked: Boolean)(implicit ctx: Context) @title = @{ s"${gameVsText(pov.game, withRatings = true)} in ${pov.gameId}" } @moreJs = { @roundTag @embedJs { window.customWS = true; window.onload = function() { LichessRound.boot({ data: @safeJson(data), i18n: @jsI18n(pov.game), chat: @jsOrNull(chatOption map { c => chat.ChatJsData.json(c.chat, name = trans.spectatorRoom.txt(), timeout = c.timeout, withNote = ctx.isAuth, public = true) }) }, document.getElementById('lichess')); }; } } @atom = { } @underchat = { @views.html.game.watchers() @round.blurs(pov.game) @round.holdAlerts(pov.game) } @round.layout( title = title, side = views.html.game.side(pov, (data\"game"\"initialFen").asOpt[String], tour.map(_.tour), simul = simul, userTv = userTv, bookmarked = bookmarked), chat = chat.dom().some, underchat = underchat.some, moreJs = moreJs, moreCss = cssTag("chat.css"), openGraph = povOpenGraph(pov).some, chessground = false, atom = atom.some) {
@board.domPreload(pov.some)
@cross.map { c =>
@views.html.game.crosstable(ctx.userId.fold(c)(c.fromPov), pov.gameId.some)
}
}