Fix typo game --> o (copy-pasted too quickly)
[vchess.git] / client / src / views / Hall.vue
index 5b537d8..4be708d 100644 (file)
@@ -128,7 +128,8 @@ main
             )
               | {{ st.tr["Observe"] }}
             button.player-action(
-              v-else-if="isFocusedOnHall(sid)"
+              v-else-if="st.user.sid != sid"
+              :class="{focused: isFocusedOnHall(sid)}"
               @click="challenge(sid)"
             )
               | {{ st.tr["Challenge"] }}
@@ -561,9 +562,12 @@ export default {
     },
     // o: challenge or game
     classifyObject: function(o) {
-      // Consider imports as live games (TODO)
-      if (!!o.id && !!o.id.toString().match(/^i/)) return "live";
-      return o.cadence.indexOf("d") === -1 ? "live" : "corr";
+      // No imported games here
+      return (
+        o.cadence.indexOf("d") >= 0
+          ? "corr"
+          : (o.cadence.indexOf("/") >= 0 ? "simul" : "live")
+      );
     },
     setDisplay: function(letter, type, e) {
       this[letter + "display"] = type;
@@ -1415,6 +1419,8 @@ div#peopleWrap > .card
 
 button.player-action
   margin-left: 32px
+  &.focused
+    background-color: #E6D271
 
 .somethingnew
   background-color: #90C4EC !important