mirror of
https://github.com/Team254/cheesy-arena-lite.git
synced 2026-03-09 21:56:50 -04:00
Fix alliance station display bugs.
This commit is contained in:
@@ -34,7 +34,7 @@ body[data-mode=match] .mode#match {
|
||||
display: block;
|
||||
}
|
||||
body[data-mode=fieldReset] .mode#fieldReset {
|
||||
display: block;
|
||||
display: table;
|
||||
}
|
||||
|
||||
/* Logo Mode */
|
||||
@@ -66,16 +66,15 @@ body[data-mode=fieldReset] .mode#fieldReset {
|
||||
/* Field Reset Mode */
|
||||
#fieldReset {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 65%;
|
||||
line-height: 300px;
|
||||
margin: auto auto;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
#fieldReset div {
|
||||
display: table-cell;
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
font-size: 300px;
|
||||
font-size: 350px;
|
||||
line-height: 350px;
|
||||
}
|
||||
|
||||
/* Match Mode */
|
||||
@@ -170,4 +169,6 @@ body[data-position=right] #inMatch #blueScore {
|
||||
[data-alliance-bg=B], [data-status=B] {
|
||||
background-color: #00c;
|
||||
}
|
||||
|
||||
#teamRank {
|
||||
background-color: transparent;
|
||||
}
|
||||
@@ -47,7 +47,7 @@ var handleSetMatch = function(data) {
|
||||
$("#teamNameText").attr("data-alliance-bg", allianceStation[0]).text(team.Nickname);
|
||||
|
||||
var ranking = data.Rankings[team.Id];
|
||||
if (ranking) {
|
||||
if (ranking && data.MatchType == "qualification") {
|
||||
var rankingText = ranking.Rank;
|
||||
$("#teamRank").attr("data-alliance-bg", allianceStation[0]).text(rankingText);
|
||||
} else {
|
||||
@@ -69,8 +69,8 @@ var handleStatus = function(data) {
|
||||
var blink = false;
|
||||
if (stationStatus && stationStatus.Bypass) {
|
||||
$("#match").attr("data-status", "bypass");
|
||||
} else if (stationStatus && stationStatus.DsConn) {
|
||||
if (!stationStatus.DsConn.DsLinked) {
|
||||
} else if (stationStatus) {
|
||||
if (!stationStatus.DsConn || !stationStatus.DsConn.DsLinked) {
|
||||
$("#match").attr("data-status", allianceStation[0]);
|
||||
} else if (!stationStatus.DsConn.RobotLinked) {
|
||||
blink = true;
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<div id="logo" class="mode">
|
||||
<img id="logoImg" src="/static/img/alliance-station-logo.gif" alt="logo" />
|
||||
</div>
|
||||
<div id="fieldReset" class="mode">FIELD<br />RESET</div>
|
||||
<div id="fieldReset" class="mode"><div>FIELD<br />RESET</div></div>
|
||||
<script>
|
||||
// A unique id to differentiate this station's display from its peers.
|
||||
var displayId = "{{.DisplayId}}";
|
||||
|
||||
@@ -154,10 +154,11 @@ func (web *Web) allianceStationDisplayWebsocketHandler(w http.ResponseWriter, r
|
||||
AllianceStation string
|
||||
Teams map[string]*model.Team
|
||||
Rankings map[string]*game.Ranking
|
||||
MatchType string
|
||||
}{station, map[string]*model.Team{"R1": web.arena.AllianceStations["R1"].Team,
|
||||
"R2": web.arena.AllianceStations["R2"].Team, "R3": web.arena.AllianceStations["R3"].Team,
|
||||
"B1": web.arena.AllianceStations["B1"].Team, "B2": web.arena.AllianceStations["B2"].Team,
|
||||
"B3": web.arena.AllianceStations["B3"].Team}, rankings}
|
||||
"B3": web.arena.AllianceStations["B3"].Team}, rankings, web.arena.CurrentMatch.Type}
|
||||
case _, ok := <-robotStatusListener:
|
||||
if !ok {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user