keep zen mode on when game ends

This commit is contained in:
Thibault Duplessis 2021-06-16 14:29:16 +02:00
parent 230a315906
commit ec6ec2569f
3 changed files with 4 additions and 4 deletions

View file

@ -6,7 +6,7 @@
display: none;
border-bottom-right-radius: $box-radius-size;
body.playing.zen & {
body.zen & {
display: block;
}

View file

@ -1,10 +1,10 @@
%zen {
body.playing.zen & {
body.zen & {
display: none;
}
}
body.playing.zen {
body.zen {
.ricons {
margin: 0.5em 0 1em 0;
}

View file

@ -142,7 +142,7 @@ export default class RoundController {
});
lichess.pubsub.on('zen', () => {
if (this.isPlaying()) {
if (!this.data.player.spectator) {
const zen = $('body').toggleClass('zen').hasClass('zen');
window.dispatchEvent(new Event('resize'));
xhr.setZen(zen);