From cf459e8b7355240c31ccdee7b292207f9fee99a1 Mon Sep 17 00:00:00 2001 From: Kyle Waremburg Date: Mon, 17 Jun 2024 22:50:27 -0500 Subject: [PATCH] Adds normal ref mode for referee panel --- static/css/referee_panel.css | 6 ++++++ static/js/referee_panel.js | 4 ++++ templates/base.html | 3 ++- templates/referee_panel.html | 4 ++-- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/static/css/referee_panel.css b/static/css/referee_panel.css index fab66242..c5462d8f 100644 --- a/static/css/referee_panel.css +++ b/static/css/referee_panel.css @@ -38,6 +38,9 @@ h3 { flex-direction: column; align-items: center; } +#cards[data-hr="false"] { + display: none; +} .alliance-cards { padding: 0.5vw 1vw; display: flex; @@ -175,6 +178,9 @@ h3 { flex-direction: row; justify-content: center; } +#controlButtons[data-hr="false"] { + display: none; +} .control-button { width: 20vw; height: 4vw; diff --git a/static/js/referee_panel.js b/static/js/referee_panel.js index 8d0ca097..20a6bc26 100644 --- a/static/js/referee_panel.js +++ b/static/js/referee_panel.js @@ -128,6 +128,10 @@ const hashObject = function(object) { } $(function() { + // Read the configuration for this display from the URL query string. + var urlParams = new URLSearchParams(window.location.search); + $(".headRef-dependent").attr("data-hr", urlParams.get("hr")); + // Set up the websocket back to the server. websocket = new CheesyWebsocket("/panels/referee/websocket", { matchLoad: function(event) { handleMatchLoad(event.data); }, diff --git a/templates/base.html b/templates/base.html index 2d056251..85d37f4c 100644 --- a/templates/base.html +++ b/templates/base.html @@ -41,7 +41,8 @@