X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=public%2Fjavascripts%2Fcomponents%2FgameList.js;h=9b669826ae303913c629ca2e6eeb4d373d0415b0;hb=b955c65b942d09d24b5c3bed0d755d4f2f8f71f1;hp=3fcb40e5aea7d1ed6d9e50e05be7216d35f69e8e;hpb=b6487fb9c41705187cf97215fc9e8f86a59057c7;p=vchess.git diff --git a/public/javascripts/components/gameList.js b/public/javascripts/components/gameList.js index 3fcb40e5..9b669826 100644 --- a/public/javascripts/components/gameList.js +++ b/public/javascripts/components/gameList.js @@ -1,4 +1,29 @@ -// TODO -//My games : (tabs) -//mes parties en cours --> démarrer là-dessus si y en a et c'est à moi de jouer ? -//mes parties terminées (possibilité de supprimer) +Vue.component("my-game-list", { + props: ["games"], + computed: { + showVariant: function() { + return this.games.length > 0 && !!this.games[0].vname; + }, + showResult: function() { + return this.games.length > 0 && this.games[0].score != "*"; + }, + }, + template: ` + + + + + + + + + + + + + +
VariantPlayers namesCadenceResult
{{ g.vname }} + {{ p.name }} + {{ g.mainTime }} + {{ g.increment }}{{ g.score }}
+ `, +});