Rende usabili calendario, overlay ospite e stato diretta del cartellone.

Il calendario non deve più scorrere in orizzontale, il logo a destra non copre il nome e una diretta YouTube o in collegamento compare come In diretta.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-06 09:55:08 +02:00
co-authored by Cursor
parent b09e83db09
commit c3ef8e91a6
13 changed files with 296 additions and 108 deletions
@@ -67,7 +67,7 @@ module Public
sessions = match.stream_sessions.to_a
latest = sessions.max_by(&:created_at)
if latest && !latest.status.in?(%w[ended error])
return :live if latest.status.in?(%w[live reconnecting paused])
return :live if latest.status.in?(%w[live reconnecting paused connecting])
return :waiting_operator
end
@@ -106,6 +106,18 @@ module Public
:waiting
end
def tournament_public_watch_target(session)
return unless session
if session.matchlivetv_platform? && session.publicly_listed?
return [public_live_path(session), t("tournaments.page.watch_live"), {}]
end
if session.youtube_watch_url.present?
return [session.youtube_watch_url, t("live.show.youtube_watch_link"), { target: "_blank", rel: "noopener" }]
end
nil
end
def tournament_public_score_label(match)
return "#{match.home_score}#{match.away_score}" if match.home_score.present? && match.away_score.present?