Stabilizza regia, live web e sync punteggi app nativa.
Corregge scadenza token regia oltre le 8h, tabellone HTML sulla pagina live, pulsanti pausa/ripresa in regia, link admin e broadcast ActionCable diretto. App Android: overlay branding, sync score da regia via WebSocket con reconnect e poll. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -61,6 +61,36 @@ module Public
|
||||
"#{match.team.name} #{score_state.home_points} - #{score_state.away_points} #{match.opponent_name}"
|
||||
end
|
||||
|
||||
def live_scorebug_columns(score_state)
|
||||
unless score_state
|
||||
return {
|
||||
labels: ["1"],
|
||||
home: ["0"],
|
||||
away: ["0"],
|
||||
live_index: 0
|
||||
}
|
||||
end
|
||||
|
||||
partials = Array(score_state.set_partials)
|
||||
labels = partials.map { |p| (p["set"] || p[:set]).to_s }
|
||||
home = partials.map { |p| (p["home"] || p[:home]).to_s }
|
||||
away = partials.map { |p| (p["away"] || p[:away]).to_s }
|
||||
labels << score_state.current_set.to_s
|
||||
home << score_state.home_points.to_s
|
||||
away << score_state.away_points.to_s
|
||||
{
|
||||
labels: labels,
|
||||
home: home,
|
||||
away: away,
|
||||
live_index: labels.length - 1
|
||||
}
|
||||
end
|
||||
|
||||
def live_scorebug_team_label(name, max: 16)
|
||||
n = name.to_s
|
||||
n.length <= max ? n : "#{n[0, max - 1]}…"
|
||||
end
|
||||
|
||||
# Colore ospite sul tabellone: secondario società se leggibile su bianco, altrimenti blu visitatore.
|
||||
def live_scorebug_away_color(team)
|
||||
club = team.club
|
||||
|
||||
Reference in New Issue
Block a user