Add some TODOs for simultaneous games support
[vchess.git] / client / src / components / ChallengeList.vue
index 8c1f2dd..5c58263 100644 (file)
@@ -15,7 +15,7 @@ div
       )
         td {{ c.vname }}
         td {{ withWho(c) }}
-        td {{ c.cadence }}
+        td(:class="getCadenceClass(c)") {{ c.cadence }}
         td(:class="getRandomnessClass(c)")
   p(v-else)
     | {{ st.tr["No challenges found :( Click on 'New game'!"] }}
@@ -33,7 +33,8 @@ export default {
   },
   computed: {
     sortedChallenges: function() {
-      // Show in order: challenges I sent, challenges I received, other challenges
+      // Show in order:
+      // challenges I sent, challenges I received, other challenges
       let minAdded = Number.MAX_SAFE_INTEGER;
       let maxAdded = 0;
       let augmentedChalls = this.challenges.map(c => {
@@ -65,6 +66,11 @@ export default {
       return {
         ["random-" + c.randomness]: true
       };
+    },
+    getCadenceClass: function(c) {
+      return {
+        "simultaneous": c.cadence.indexOf("/") >= 0
+      };
     }
   }
 };
@@ -81,6 +87,9 @@ tr.fromyou > td
 tr.toyou > td
   background-color: #fcd785
 
+td.simultaneous
+  background-color: purple
+
 tr > td:last-child
   &.random-0
     background-color: #FF5733