analysis chat
This commit is contained in:
parent
ea50250393
commit
9cd0660a5a
|
@ -37,8 +37,11 @@ object Analyse extends LilaController {
|
|||
(bookmarkApi userIdsByGame pov.game) zip
|
||||
Env.game.pgnDump(pov.game) zip
|
||||
(env.analyser get pov.game.id) zip
|
||||
(pov.game.tournamentId ?? TournamentRepo.byId) map {
|
||||
case ((((version, bookmarkers), pgn), analysis), tour) ⇒
|
||||
(pov.game.tournamentId ?? TournamentRepo.byId) zip
|
||||
(ctx.isAuth ?? {
|
||||
Env.chat.api.userChat find s"${pov.gameId}/w" map (_.some)
|
||||
}) map {
|
||||
case (((((version, bookmarkers), pgn), analysis), tour), chat) ⇒
|
||||
html.analyse.replay(
|
||||
pov,
|
||||
analysis.fold(pgn)(a ⇒ Env.analyse.annotator(pgn, a)).toString,
|
||||
|
@ -47,6 +50,7 @@ object Analyse extends LilaController {
|
|||
analysis,
|
||||
analysis filter (_.done) map { a ⇒ AdvantageChart(a.infoAdvices, pov.game.pgnMoves) },
|
||||
version,
|
||||
chat,
|
||||
tour)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@ object Round extends LilaController with TheftPrevention {
|
|||
(analyser has pov.gameId) zip
|
||||
(pov.game.tournamentId ?? TournamentRepo.byId) zip
|
||||
(ctx.isAuth ?? {
|
||||
Env.chat.api.playerChat find s"${pov.gameId}/w" map (_.some)
|
||||
Env.chat.api.userChat find s"${pov.gameId}/w" map (_.some)
|
||||
}) map {
|
||||
case ((((bookmarkers, v), analysed), tour), chat) ⇒
|
||||
Ok(html.round.watcher(pov, v, bookmarkers, analysed, chat, tour))
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
@base.layout(
|
||||
title = title,
|
||||
goodies = goodies,
|
||||
chat = chat,
|
||||
underchat = underchat,
|
||||
active = siteMenu.game.some,
|
||||
moreCss = moreCss,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
@(pov: Pov, pgn: String, bookmarkers: List[String], opening: Option[chess.OpeningExplorer.Opening], analysis: Option[lila.analyse.Analysis], advantageChart: Option[String], version: Int, tour: Option[lila.tournament.Tournament])(implicit ctx: Context)
|
||||
@(pov: Pov, pgn: String, bookmarkers: List[String], opening: Option[chess.OpeningExplorer.Opening], analysis: Option[lila.analyse.Analysis], advantageChart: Option[String], version: Int, chat: Option[lila.chat.UserChat], tour: Option[lila.tournament.Tournament])(implicit ctx: Context)
|
||||
|
||||
@import pov._
|
||||
|
||||
|
@ -36,6 +36,7 @@
|
|||
@analyse.layout(
|
||||
title = trans.replayAndAnalyse() + " " + gameId,
|
||||
goodies = views.html.game.infoBox(pov, tour).some,
|
||||
chat = chat.map(c => base.chat(c, trans.spectatorRoom.str())),
|
||||
underchat = underchat.some,
|
||||
moreCss = moreCss,
|
||||
moreJs = moreJs,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
@(pov: Pov, version: Int, bookmarkers: List[String], analysed: Boolean, chat: Option[lila.chat.MixedChat], tour: Option[lila.tournament.Tournament])(implicit ctx: Context)
|
||||
@(pov: Pov, version: Int, bookmarkers: List[String], analysed: Boolean, chat: Option[lila.chat.UserChat], tour: Option[lila.tournament.Tournament])(implicit ctx: Context)
|
||||
|
||||
@import pov._
|
||||
|
||||
|
|
|
@ -1588,7 +1588,7 @@ var storage = {
|
|||
resize: function() {
|
||||
var headerHeight = this.element.parent().height();
|
||||
this.element.css("top", headerHeight + 13);
|
||||
this.$msgs.css('height', 459 - headerHeight).scrollTop(999999);
|
||||
this.$msgs.css('height', 457 - headerHeight).scrollTop(999999);
|
||||
},
|
||||
append: function(msg) {
|
||||
this._appendHtml(this._render(msg));
|
||||
|
@ -2544,6 +2544,10 @@ var storage = {
|
|||
event.stopPropagation();
|
||||
return false;
|
||||
});
|
||||
var $chat = $("div.lichess_chat").chat({
|
||||
resize: true,
|
||||
messages: lichess_chat
|
||||
});
|
||||
var $watchers = $("div.watchers").watchers();
|
||||
|
||||
lichess.socket = new strongSocket(
|
||||
|
|
Loading…
Reference in a new issue