X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=public%2Fjavascripts%2Fcomponents%2FtabGames.js;fp=public%2Fjavascripts%2Fcomponents%2FtabGames.js;h=3181be6b6fcbb2a11b74c426477635ce5f92464d;hb=60d9063fdfcd4b7628fbc0e0fc594f083bda8761;hp=0000000000000000000000000000000000000000;hpb=214dfe16b01836fb19291ebf209bb7035993bafe;p=vchess.git diff --git a/public/javascripts/components/tabGames.js b/public/javascripts/components/tabGames.js new file mode 100644 index 00000000..3181be6b --- /dev/null +++ b/public/javascripts/components/tabGames.js @@ -0,0 +1,39 @@ +// "My" games: tabs my archived local games, my correspondance games +// + my imported games (of any type). +// TODO: later, also add possibility to upload a game (parse PGN). +Vue.component("my-tab-games", { + props: ["settings"], + data: function() { + return { + display: "", + imported: [], + local: [], + corr: [] + }; + }, + template: ` +
+
+ + + +
+ + + + + + +
+ `, + created: function() { + // TODO: fetch corr games, local and corr + // if any corr game where it's my turn, set display = "corr", + // else set display = "local" (if any) or imported (if any and no local) + }, + methods: { + update: function() { + // TODO: scan local + imported games, if any new then add it + }, + }, +});