diff --git a/TScripts/Control.ts b/TScripts/Control.ts index 0384d85..f3f95cc 100644 --- a/TScripts/Control.ts +++ b/TScripts/Control.ts @@ -1,10 +1,6 @@ class Control{ - constructor(){ - - } - static createTournament(){ // new tournament // buildTournamentPage @@ -13,46 +9,6 @@ class Control{ static loadTournament(){ // load // build - const l = new Log(4,LogEvent.EDIT_MATCH,4,7) - const a = JSON.stringify(l); - const b = JSON.stringify([4,LogEvent.EDIT_MATCH,4,7]); - console.log(a); - console.log(b); - const c = JSON.parse(a); - const d = JSON.parse(b); - console.log(c); - console.log(d); - const e = new Log(c.id,c.type,c.previous,c.after); - console.log(e); - console.log(e.getType()); - - const jsonBlob = new Blob([a],{type: 'application/json'}); - - const downloadLink = document.createElement('a'); - downloadLink.href = URL.createObjectURL(jsonBlob); - downloadLink.download = 'object.json'; - downloadLink.textContent = 'Download Object'; - - document.body.appendChild(downloadLink); - - - downloadLink.addEventListener('click', () => { - URL.revokeObjectURL(downloadLink.href); - }); - - const jsonBlobII = new Blob([b],{type: 'application/json'}); - - const downloadLinkII = document.createElement('a'); - downloadLinkII.href = URL.createObjectURL(jsonBlobII); - downloadLinkII.download = 'tuple.json'; - downloadLinkII.textContent = 'Download Tuple'; - - document.body.appendChild(downloadLinkII); - - - downloadLinkII.addEventListener('click', () => { - URL.revokeObjectURL(downloadLinkII.href); - }); } static resumeTournament(){ diff --git a/TScripts/UI.ts b/TScripts/UI.ts index e69de29..7f35a8b 100644 --- a/TScripts/UI.ts +++ b/TScripts/UI.ts @@ -0,0 +1,25 @@ + +class UI{ + + static buildHomePage(){ + // append all buttons and whatever + } + + static buildTournamentPage(){ + // append all buttons with current tournament inserted to html + } + + static buildMatchPage(){ + // as before, insert specific match to html if needed + } + + static buildJustMatchPage(match: Match){ + // build a page for it + // add a button for: save and start a tournament from it + } + + + static updateTournamentPage(){ + // basically when change of order method happen, so the ui reflects it + } +} \ No newline at end of file