Attempt to get front end operational WIP
This commit is contained in:
parent
1d3fa4a924
commit
dd7c76d59f
|
@ -43,7 +43,7 @@ i18n: @round.jsI18n()
|
|||
@analyse.layout(
|
||||
title = title,
|
||||
side = views.html.game.side(pov, tour, withTourStanding = false).some,
|
||||
chat = base.chatDom(trans.spectatorRoom.str(), game.perfType.map(_ == lila.rating.PerfType.Correspondence).getOrElse(false)).some,
|
||||
chat = base.chatDom(trans.spectatorRoom.str(), ctx.isAuth).some,
|
||||
underchat = underchat.some,
|
||||
moreCss = moreCss,
|
||||
moreJs = moreJs,
|
||||
|
|
|
@ -20,7 +20,7 @@ i18n: @jsI18n()
|
|||
@round.layout(
|
||||
title = title,
|
||||
side = views.html.game.side(pov, tour, withTourStanding = true),
|
||||
chat = pov.game.hasChat.option(base.chatDom(trans.chatRoom.str(), game.perfType.map(_ == lila.rating.PerfType.Correspondence).getOrElse(false))),
|
||||
chat = pov.game.hasChat.option(base.chatDom(trans.chatRoom.str(), game.perfType.map(_ == lila.rating.PerfType.Correspondence && ctx.isAuth).getOrElse(false))),
|
||||
underchat = views.html.game.watchers().some,
|
||||
moreJs = moreJs,
|
||||
openGraph = povOpenGraph(pov)) {
|
||||
|
|
|
@ -20,7 +20,7 @@ i18n: @jsI18n()
|
|||
@round.layout(
|
||||
title = title,
|
||||
side = views.html.game.side(pov, tour, withTourStanding = false, userTv = userTv),
|
||||
chat = base.chatDom(trans.spectatorRoom.str(), game.perfType.map(_ == lila.rating.PerfType.Correspondence).getOrElse(false)).some,
|
||||
chat = base.chatDom(trans.spectatorRoom.str()).some,
|
||||
underchat = views.html.game.watchers().some,
|
||||
moreJs = moreJs,
|
||||
openGraph = povOpenGraph(pov)) {
|
||||
|
|
|
@ -967,7 +967,6 @@ var storage = {
|
|||
if (self.options.messages.length > 0) self._appendMany(self.options.messages);
|
||||
|
||||
// Toggle Notes/Chat display
|
||||
var gameId = lichess.round.data.game.id || lichess.prelude.data.game.id || lichess.analyse.data.game.id;
|
||||
$panels = $('div.chat_panels > div');
|
||||
$('div.chat_menu').on('click', 'a', function() {
|
||||
var panel = $(this).data('panel');
|
||||
|
@ -978,10 +977,10 @@ var storage = {
|
|||
$notes = $('#notes');
|
||||
|
||||
$notes.on('change', function() {
|
||||
storage.set('notes_'+gameId, $notes.val());
|
||||
console.log($notes.val());
|
||||
$.post({url: '/' + game.id + '/note', data:{text: $notes.val()}});
|
||||
});
|
||||
$notes.val(storage.get('notes_'+gameId) || '');
|
||||
var noteText = lichess.round.data.note; //|| lichess.analysis.data.note || ''; // <- That makes it fail
|
||||
$notes.val(noteText);
|
||||
},
|
||||
append: function(msg) {
|
||||
this._appendHtml(this._render(msg));
|
||||
|
|
Loading…
Reference in a new issue