X-Git-Url: https://git.auder.net/variants/Cwda/complete_rules.html?a=blobdiff_plain;f=client%2Fsrc%2Fviews%2FMyGames.vue;h=d12fff480f845d1e031cc98926e24b89da124ce7;hb=e30523f27d5989903de6743a8b4f194a390d576c;hp=c630668f278dec84aaa4f3f9e21079fefc026d5a;hpb=fd7aea36b8da702df87be3ed055f9a1f59c9f4da;p=vchess.git
diff --git a/client/src/views/MyGames.vue b/client/src/views/MyGames.vue
index c630668f..d12fff48 100644
--- a/client/src/views/MyGames.vue
+++ b/client/src/views/MyGames.vue
@@ -1,5 +1,447 @@
- // TODO: AJAX call get corr games (all variants)
- // si dernier lastMove sur serveur n'est pas le mien et nextColor == moi, alors background orange
- // ==> background orange si à moi de jouer par corr (sur main index)
- // (helper: static fonction "GetNextCol()" dans base_rules.js)
-//use GameStorage.getAll()
+
+main
+ .row
+ .col-sm-12.col-md-10.col-md-offset-1.col-lg-8.col-lg-offset-2
+ .button-group
+ button.tabbtn#liveGames(@click="setDisplay('live',$event)")
+ | {{ st.tr["Live games"] }}
+ button.tabbtn#corrGames(@click="setDisplay('corr',$event)")
+ | {{ st.tr["Correspondence games"] }}
+ button.tabbtn#importGames(@click="setDisplay('import',$event)")
+ | {{ st.tr["Imported games"] }}
+ GameList(
+ ref="livegames"
+ v-show="display=='live'"
+ :games="liveGames"
+ @show-game="showGame"
+ @abortgame="abortGame"
+ )
+ GameList(
+ v-show="display=='corr'"
+ ref="corrgames"
+ :games="corrGames"
+ @show-game="showGame"
+ @abortgame="abortGame"
+ )
+ UploadGame(
+ v-show="display=='import'"
+ @game-uploaded="addGameImport"
+ )
+ GameList(
+ v-show="display=='import'"
+ ref="importgames"
+ :games="importGames"
+ :show-both="true"
+ @show-game="showGame"
+ )
+ button#loadMoreBtn(
+ v-show="hasMore[display]"
+ @click="loadMore(display)"
+ )
+ | {{ st.tr["Load more"] }}
+
+
+
+
+
+
+
+