From 5d4a9ad4ffae46fe73b5729cdd41d5c00a12ad96 Mon Sep 17 00:00:00 2001
From: Benjamin Auder <benjamin.auder@somewhere>
Date: Mon, 30 Mar 2020 02:14:17 +0200
Subject: [PATCH] Fix clocks + name display on small screens

---
 client/src/views/Game.vue | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

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;
     },
-- 
2.44.0