Skip to content

Commit

Permalink
Update game logos for 2024.
Browse files Browse the repository at this point in the history
  • Loading branch information
patfair committed May 14, 2024
1 parent 2495224 commit 6a4406b
Show file tree
Hide file tree
Showing 13 changed files with 85 additions and 118 deletions.
Binary file modified static/img/alliance-selection-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/img/alliance-station-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/img/game-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 0 additions & 14 deletions static/img/link.svg

This file was deleted.

3 changes: 0 additions & 3 deletions static/img/node_states/Cone.svg

This file was deleted.

4 changes: 0 additions & 4 deletions static/img/node_states/ConeThenCube.svg

This file was deleted.

3 changes: 0 additions & 3 deletions static/img/node_states/Cube.svg

This file was deleted.

4 changes: 0 additions & 4 deletions static/img/node_states/CubeThenCone.svg

This file was deleted.

4 changes: 0 additions & 4 deletions static/img/node_states/TwoCones.svg

This file was deleted.

4 changes: 0 additions & 4 deletions static/img/node_states/TwoCubes.svg

This file was deleted.

118 changes: 60 additions & 58 deletions static/js/audience_display.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,33 +143,35 @@ const handleMatchTime = function(data) {

// Handles a websocket message to update the match score.
const handleRealtimeScore = function(data) {
$("#" + redSide + "ScoreNumber").text(data.Red.ScoreSummary.Score - data.Red.ScoreSummary.EndgamePoints);
$("#" + blueSide + "ScoreNumber").text(data.Blue.ScoreSummary.Score - data.Blue.ScoreSummary.EndgamePoints);

$("#" + redSide + "LinkNumerator").text(data.Red.ScoreSummary.NumLinks);
$("#" + redSide + "LinkDenominator").text(data.Red.ScoreSummary.NumLinksGoal);
$("#" + blueSide + "LinkNumerator").text(data.Blue.ScoreSummary.NumLinks);
$("#" + blueSide + "LinkDenominator").text(data.Blue.ScoreSummary.NumLinksGoal);
if (currentMatch.Type === matchTypePlayoff) {
$("#" + redSide + "LinkDenominator").hide();
$("#" + blueSide + "LinkDenominator").hide();
$(".link-splitter").hide();
} else {
$("#" + redSide + "LinkDenominator").show();
$("#" + blueSide + "LinkDenominator").show();
$(".link-splitter").show();
}

fetch("/api/grid/red/svg")
.then(response => response.text())
.then(svg => $(`#${redSide}Grid`).html(svg));
fetch("/api/grid/blue/svg")
.then(response => response.text())
.then(svg => $(`#${blueSide}Grid`).html(svg));
// TODO(pat): Update for 2024.
$("#" + redSide + "ScoreNumber").text(data.Red.ScoreSummary.Score - data.Red.ScoreSummary.StagePoints);
$("#" + blueSide + "ScoreNumber").text(data.Blue.ScoreSummary.Score - data.Blue.ScoreSummary.StagePoints);
//
// $("#" + redSide + "LinkNumerator").text(data.Red.ScoreSummary.NumLinks);
// $("#" + redSide + "LinkDenominator").text(data.Red.ScoreSummary.NumLinksGoal);
// $("#" + blueSide + "LinkNumerator").text(data.Blue.ScoreSummary.NumLinks);
// $("#" + blueSide + "LinkDenominator").text(data.Blue.ScoreSummary.NumLinksGoal);
// if (currentMatch.Type === matchTypePlayoff) {
// $("#" + redSide + "LinkDenominator").hide();
// $("#" + blueSide + "LinkDenominator").hide();
// $(".link-splitter").hide();
// } else {
// $("#" + redSide + "LinkDenominator").show();
// $("#" + blueSide + "LinkDenominator").show();
// $(".link-splitter").show();
// }
//
// fetch("/api/grid/red/svg")
// .then(response => response.text())
// .then(svg => $(`#${redSide}Grid`).html(svg));
// fetch("/api/grid/blue/svg")
// .then(response => response.text())
// .then(svg => $(`#${blueSide}Grid`).html(svg));
};

// Handles a websocket message to populate the final score data.
const handleScorePosted = function(data) {
// TODO(pat): Update for 2024.
$("#" + redSide + "FinalScore").text(data.RedScoreSummary.Score);
$("#" + redSide + "FinalAlliance").text("Alliance " + data.Match.PlayoffRedAlliance);
setTeamInfo(redSide, 1, data.Match.Red1, data.RedRankings);
Expand All @@ -180,23 +182,23 @@ const handleScorePosted = function(data) {
} else {
setTeamInfo(redSide, 4, 0, data.RedRankings);
}
$("#" + redSide + "FinalMobilityPoints").text(data.RedScoreSummary.MobilityPoints);
$("#" + redSide + "FinalGridPoints").text(data.RedScoreSummary.GridPoints);
$("#" + redSide + "FinalChargeStationPoints").text(data.RedScoreSummary.ChargeStationPoints);
$("#" + redSide + "FinalParkPoints").text(data.RedScoreSummary.ParkPoints);
$("#" + redSide + "FinalFoulPoints").text(data.RedScoreSummary.FoulPoints);
$("#" + redSide + "FinalSustainabilityBonusRankingPoint").html(
data.RedScoreSummary.SustainabilityBonusRankingPoint ? "✔" : "✘"
);
$("#" + redSide + "FinalSustainabilityBonusRankingPoint").attr(
"data-checked", data.RedScoreSummary.SustainabilityBonusRankingPoint
);
$("#" + redSide + "FinalActivationBonusRankingPoint").html(
data.RedScoreSummary.ActivationBonusRankingPoint ? "✔" : "✘"
);
$("#" + redSide + "FinalActivationBonusRankingPoint").attr(
"data-checked", data.RedScoreSummary.ActivationBonusRankingPoint
);
// $("#" + redSide + "FinalMobilityPoints").text(data.RedScoreSummary.MobilityPoints);
// $("#" + redSide + "FinalGridPoints").text(data.RedScoreSummary.GridPoints);
// $("#" + redSide + "FinalChargeStationPoints").text(data.RedScoreSummary.ChargeStationPoints);
// $("#" + redSide + "FinalParkPoints").text(data.RedScoreSummary.ParkPoints);
// $("#" + redSide + "FinalFoulPoints").text(data.RedScoreSummary.FoulPoints);
// $("#" + redSide + "FinalSustainabilityBonusRankingPoint").html(
// data.RedScoreSummary.SustainabilityBonusRankingPoint ? "✔" : "✘"
// );
// $("#" + redSide + "FinalSustainabilityBonusRankingPoint").attr(
// "data-checked", data.RedScoreSummary.SustainabilityBonusRankingPoint
// );
// $("#" + redSide + "FinalActivationBonusRankingPoint").html(
// data.RedScoreSummary.ActivationBonusRankingPoint ? "✔" : "✘"
// );
// $("#" + redSide + "FinalActivationBonusRankingPoint").attr(
// "data-checked", data.RedScoreSummary.ActivationBonusRankingPoint
// );
$("#" + redSide + "FinalRankingPoints").html(data.RedRankingPoints);
$("#" + redSide + "FinalWins").text(data.RedWins);
const redFinalDestination = $("#" + redSide + "FinalDestination");
Expand All @@ -214,23 +216,23 @@ const handleScorePosted = function(data) {
} else {
setTeamInfo(blueSide, 4, 0, data.BlueRankings);
}
$("#" + blueSide + "FinalMobilityPoints").text(data.BlueScoreSummary.MobilityPoints);
$("#" + blueSide + "FinalGridPoints").text(data.BlueScoreSummary.GridPoints);
$("#" + blueSide + "FinalChargeStationPoints").text(data.BlueScoreSummary.ChargeStationPoints);
$("#" + blueSide + "FinalParkPoints").text(data.BlueScoreSummary.ParkPoints);
$("#" + blueSide + "FinalFoulPoints").text(data.BlueScoreSummary.FoulPoints);
$("#" + blueSide + "FinalSustainabilityBonusRankingPoint").html(
data.BlueScoreSummary.SustainabilityBonusRankingPoint ? "✔" : "✘"
);
$("#" + blueSide + "FinalSustainabilityBonusRankingPoint").attr(
"data-checked", data.BlueScoreSummary.SustainabilityBonusRankingPoint
);
$("#" + blueSide + "FinalActivationBonusRankingPoint").html(
data.BlueScoreSummary.ActivationBonusRankingPoint ? "✔" : "✘"
);
$("#" + blueSide + "FinalActivationBonusRankingPoint").attr(
"data-checked", data.BlueScoreSummary.ActivationBonusRankingPoint
);
// $("#" + blueSide + "FinalMobilityPoints").text(data.BlueScoreSummary.MobilityPoints);
// $("#" + blueSide + "FinalGridPoints").text(data.BlueScoreSummary.GridPoints);
// $("#" + blueSide + "FinalChargeStationPoints").text(data.BlueScoreSummary.ChargeStationPoints);
// $("#" + blueSide + "FinalParkPoints").text(data.BlueScoreSummary.ParkPoints);
// $("#" + blueSide + "FinalFoulPoints").text(data.BlueScoreSummary.FoulPoints);
// $("#" + blueSide + "FinalSustainabilityBonusRankingPoint").html(
// data.BlueScoreSummary.SustainabilityBonusRankingPoint ? "✔" : "✘"
// );
// $("#" + blueSide + "FinalSustainabilityBonusRankingPoint").attr(
// "data-checked", data.BlueScoreSummary.SustainabilityBonusRankingPoint
// );
// $("#" + blueSide + "FinalActivationBonusRankingPoint").html(
// data.BlueScoreSummary.ActivationBonusRankingPoint ? "✔" : "✘"
// );
// $("#" + blueSide + "FinalActivationBonusRankingPoint").attr(
// "data-checked", data.BlueScoreSummary.ActivationBonusRankingPoint
// );
$("#" + blueSide + "FinalRankingPoints").html(data.BlueRankingPoints);
$("#" + blueSide + "FinalWins").text(data.BlueWins);
const blueFinalDestination = $("#" + blueSide + "FinalDestination");
Expand Down Expand Up @@ -731,7 +733,7 @@ const setTeamInfo = function(side, position, teamId, rankings) {
}

const rankIndicatorElement = $(`#${side}FinalTeam${position}RankIndicator`);
rankIndicatorElement.attr("src", `/static/img/${rankIndicator}.svg`);
rankIndicatorElement.attr("src", rankIndicator === "" ? "" : `/static/img/${rankIndicator}.svg`);
rankIndicatorElement.toggle(rankIndicator !== "" && teamId > 0);

const rankNumberElement = $(`#${side}FinalTeam${position}RankNumber`);
Expand Down
45 changes: 23 additions & 22 deletions static/js/wall_display.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,29 +134,30 @@ const handleMatchTime = function(data) {

// Handles a websocket message to update the match score.
const handleRealtimeScore = function(data) {
$("#" + redSide + "ScoreNumber").text(data.Red.ScoreSummary.Score - data.Red.ScoreSummary.EndgamePoints);
$("#" + blueSide + "ScoreNumber").text(data.Blue.ScoreSummary.Score - data.Blue.ScoreSummary.EndgamePoints);
$("#" + redSide + "ScoreNumber").text(data.Red.ScoreSummary.Score - data.Red.ScoreSummary.StagePoints);
$("#" + blueSide + "ScoreNumber").text(data.Blue.ScoreSummary.Score - data.Blue.ScoreSummary.StagePoints);

$("#" + redSide + "LinkNumerator").text(data.Red.ScoreSummary.NumLinks);
$("#" + redSide + "LinkDenominator").text(data.Red.ScoreSummary.NumLinksGoal);
$("#" + blueSide + "LinkNumerator").text(data.Blue.ScoreSummary.NumLinks);
$("#" + blueSide + "LinkDenominator").text(data.Blue.ScoreSummary.NumLinksGoal);
if (currentMatch.Type === matchTypePlayoff) {
$("#" + redSide + "LinkDenominator").hide();
$("#" + blueSide + "LinkDenominator").hide();
$(".link-splitter").hide();
} else {
$("#" + redSide + "LinkDenominator").show();
$("#" + blueSide + "LinkDenominator").show();
$(".link-splitter").show();
}

fetch("/api/grid/red/svg")
.then(response => response.text())
.then(svg => $(`#${redSide}Grid`).html(svg));
fetch("/api/grid/blue/svg")
.then(response => response.text())
.then(svg => $(`#${blueSide}Grid`).html(svg));
// TODO(pat): Update for 2024.
// $("#" + redSide + "LinkNumerator").text(data.Red.ScoreSummary.NumLinks);
// $("#" + redSide + "LinkDenominator").text(data.Red.ScoreSummary.NumLinksGoal);
// $("#" + blueSide + "LinkNumerator").text(data.Blue.ScoreSummary.NumLinks);
// $("#" + blueSide + "LinkDenominator").text(data.Blue.ScoreSummary.NumLinksGoal);
// if (currentMatch.Type === matchTypePlayoff) {
// $("#" + redSide + "LinkDenominator").hide();
// $("#" + blueSide + "LinkDenominator").hide();
// $(".link-splitter").hide();
// } else {
// $("#" + redSide + "LinkDenominator").show();
// $("#" + blueSide + "LinkDenominator").show();
// $(".link-splitter").show();
// }
//
// fetch("/api/grid/red/svg")
// .then(response => response.text())
// .then(svg => $(`#${redSide}Grid`).html(svg));
// fetch("/api/grid/blue/svg")
// .then(response => response.text())
// .then(svg => $(`#${blueSide}Grid`).html(svg));
};

const transitionBlankToIntro = function(callback) {
Expand Down
4 changes: 2 additions & 2 deletions templates/audience_display.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<span class="link-splitter">/</span>
<span id="leftLinkDenominator"></span>
</div>
<img class="link-icon" src="/static/img/link.svg" />
<img class="link-icon" src="" />
</div>
<div class="score-grid" id="leftGrid"></div>
</div>
Expand All @@ -53,7 +53,7 @@
<span class="link-splitter">/</span>
<span id="rightLinkDenominator"></span>
</div>
<img class="link-icon" src="/static/img/link.svg" />
<img class="link-icon" src="" />
</div>
</div>
<div class="avatars">
Expand Down

0 comments on commit 6a4406b

Please sign in to comment.