diff --git a/frontend/frontend.js b/frontend/frontend.js index e3ff788..16853fb 100644 --- a/frontend/frontend.js +++ b/frontend/frontend.js @@ -20,6 +20,7 @@ document.querySelector('#settings').addEventListener('submit', (e) => { ppTimer: document.querySelector('#ppTimer').checked, delay: parseInt(document.querySelector('#delay').value), showNicknames: document.querySelector('#showNicknames').checked, + showTournament: document.querySelector('#showTournament').checked, scoreboard: { active: document.querySelector('#scoreboard-active').checked, score: document.querySelector('#scoreboard-score').checked, @@ -201,6 +202,7 @@ function initSettings(settings) { document.querySelector('#ppTimer').checked = settings.ppTimer document.querySelector('#delay').value = settings.delay document.querySelector('#showNicknames').checked = settings.showNicknames + document.querySelector('#showTournament').checked = settings.showTournament document.querySelector('#scoreboard-active').checked = settings.scoreboard.active diff --git a/frontend/gfx/ingame.js b/frontend/gfx/ingame.js index b5e1693..1f49f8b 100644 --- a/frontend/gfx/ingame.js +++ b/frontend/gfx/ingame.js @@ -1,6 +1,7 @@ const blueTeam = document.querySelector('#blue') const redTeam = document.querySelector('#red') let showNicknames, + showTournament, showLeaderBoard, showScoreBoard, score, @@ -636,6 +637,10 @@ function updateSettings(e) { }) } } + if (e.showTournament !== showTournament) { + showTournament = e.showTournament + document.querySelector('#tournament').style.display = e.showTournament ? 'block' : 'none' + } if (showScoreBoard !== e.scoreboard.active) { showScoreBoard = e.scoreboard.active diff --git a/frontend/index.html b/frontend/index.html index f975dc9..093026b 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -367,6 +367,15 @@