From: Benjamin Auder Date: Mon, 30 Mar 2020 00:14:17 +0000 (+0200) Subject: Fix clocks + name display on small screens X-Git-Url: https://git.auder.net/variants/Bario/js/pieces/current/gitweb.js?a=commitdiff_plain;h=5d4a9ad4ffae46fe73b5729cdd41d5c00a12ad96;p=vchess.git Fix clocks + name display on small screens --- diff --git a/client/src/views/Game.vue b/client/src/views/Game.vue index b77f6b0f..68afce35 100644 --- a/client/src/views/Game.vue +++ b/client/src/views/Game.vue @@ -96,7 +96,7 @@ main ) img(src="/images/icons/rematch.svg") #playersInfo - p(v-if="largeScreen") + p(v-if="isLargeScreen()") span.name(:class="{connected: isConnected(0)}") | {{ game.players[0].name || "@nonymous" }} span.time( @@ -284,6 +284,9 @@ export default { } this.send("losefocus"); }, + isLargeScreen: function() { + return window.innerWidth >= 500; + }, participateInChat: function(p) { return Object.keys(p.tmpIds).some(x => p.tmpIds[x].focus) && !!p.name; },