diff --git a/app/i18n/I18nKeys.scala b/app/i18n/I18nKeys.scala
index a233a268e6..c1859c90be 100644
--- a/app/i18n/I18nKeys.scala
+++ b/app/i18n/I18nKeys.scala
@@ -71,6 +71,7 @@ final class I18nKeys(translator: Translator) {
val contact = new Key("contact")
val thereIsNothingToSeeHereIfYouThinkItsABugYouCouldSendAnEmailToEmail = new Key("thereIsNothingToSeeHereIfYouThinkItsABugYouCouldSendAnEmailToEmail")
val shareThisUrlToLetSpectatorsSeeTheGame = new Key("shareThisUrlToLetSpectatorsSeeTheGame")
+ val youAreViewingThisGameAsASpectator = new Key("youAreViewingThisGameAsASpectator")
val replayAndAnalyse = new Key("replayAndAnalyse")
val viewGameStats = new Key("viewGameStats")
val flipBoard = new Key("flipBoard")
diff --git a/app/templating/AssetHelper.scala b/app/templating/AssetHelper.scala
index 8fffbdb048..c8435b84b0 100644
--- a/app/templating/AssetHelper.scala
+++ b/app/templating/AssetHelper.scala
@@ -7,7 +7,7 @@ import play.api.templates.Html
trait AssetHelper {
- val assetVersion = 26
+ val assetVersion = 28
def cssTag(name: String) = css("stylesheets/" + name)
diff --git a/app/views/round/watcher.scala.html b/app/views/round/watcher.scala.html
index ffddd5e23f..50a15bec9a 100644
--- a/app/views/round/watcher.scala.html
+++ b/app/views/round/watcher.scala.html
@@ -22,6 +22,7 @@ underchat = underchat.some) {
@widget.connection()
@Html(ui.Board.render(pov))
+
@trans.youAreViewingThisGameAsASpectator()
@round.cemetery(pov, "top")
diff --git a/conf/messages b/conf/messages
index 5306992b8d..8424c7c840 100644
--- a/conf/messages
+++ b/conf/messages
@@ -47,6 +47,7 @@ blackLeftTheGame=Black left the game
contact=Contact
thereIsNothingToSeeHereIfYouThinkItsABugYouCouldSendAnEmailToEmail=There is nothing to see here. If you think it's a bug, you could send an email to %s
shareThisUrlToLetSpectatorsSeeTheGame=Share this URL to let spectators see the game
+youAreViewingThisGameAsASpectator=You are viewing this game as a spectator
replayAndAnalyse=Replay and analyse
viewGameStats=View game stats
flipBoard=Flip board
diff --git a/public/javascripts/game.js b/public/javascripts/game.js
index 96564f4a0f..425aa8fa9a 100644
--- a/public/javascripts/game.js
+++ b/public/javascripts/game.js
@@ -41,6 +41,12 @@ $.widget("lichess.game", {
}
}
+ if (self.options.player.spectator) {
+ self.$board.find("div.lcs").mousedown(function() {
+ $("#dont_touch").toggle();
+ });
+ }
+
if (!self.options.opponent.ai && !self.options.player.spectator) {
// update document title to show playing state
setTimeout(self.updateTitle = function() {
diff --git a/public/stylesheets/board.css b/public/stylesheets/board.css
index 1b513d6084..7509d3e077 100644
--- a/public/stylesheets/board.css
+++ b/public/stylesheets/board.css
@@ -196,7 +196,7 @@ div.lichess_overboard p.explanations {
-webkit-box-shadow: 0px 0px 20px #d85000;
}
-#premove {
+#premove, #dont_touch {
display: none;
position: absolute;
top: 512px;
diff --git a/todo b/todo
index 61f34f8243..09b7b44b9a 100644
--- a/todo
+++ b/todo
@@ -25,6 +25,8 @@ autoclose top menus
tournaments http://www.chess.com/tournaments/help.html
long name display issue http://en.lichess.org/forum/lichess-feedback/long-names-alter-layout
fix game list translations
+replay moved square bg
+join friend rated as anon
new translations:
-rematchOfferCanceled=Rematch offer canceled