Tutte le view marketing, legali, viewer, dashboard e admin usano t(); mailer utente-facing e flash localizzati; admin con LocaleResolver e selettore lingua. Co-authored-by: Cursor <cursoragent@cursor.com>
98 lines
4.4 KiB
ERB
98 lines
4.4 KiB
ERB
<% content_for :title, t("regia.title", home: @team.name, away: @match.opponent_name) %>
|
|
<% content_for :robots, "noindex, nofollow" %>
|
|
|
|
<% content_for :head do %>
|
|
<% unless @stream_closed %>
|
|
<script src="https://cdn.jsdelivr.net/npm/hls.js@1.5.7"></script>
|
|
<% end %>
|
|
<% end %>
|
|
|
|
<div class="regia-page" id="regia-app"
|
|
data-i18n="<%= j regia_js_i18n_json %>"
|
|
data-token="<%= j params[:token] %>"
|
|
data-board="<%= @match.effective_board_type %>"
|
|
data-status-url="<%= j public_regia_status_path(params[:token]) %>"
|
|
data-score-url="<%= j public_regia_score_path(params[:token]) %>"
|
|
data-pause-url="<%= j public_regia_pause_path(params[:token]) %>"
|
|
data-resume-url="<%= j public_regia_resume_path(params[:token]) %>"
|
|
data-stop-url="<%= j public_regia_stop_path(params[:token]) %>"
|
|
data-cable-url="<%= j "/cable?regia_token=#{params[:token]}" %>"
|
|
data-hls-url="<%= j @session.hls_playback_url %>"
|
|
data-home-name="<%= j @team.name %>"
|
|
data-away-name="<%= j @match.opponent_name %>"
|
|
data-regia-share-url="<%= j @regia_share_url %>"
|
|
data-regia-share-title="<%= j @regia_share_title %>"
|
|
data-live-share-url="<%= j @live_share_url %>"
|
|
data-live-share-title="<%= j @live_share_title %>"
|
|
data-points-target="<%= @match.effective_board_type.in?(%w[volley racket]) ? Scoring::Rules.from_match(@match).points_target(@score.current_set) : 0 %>"
|
|
data-stream-closed="<%= @stream_closed %>"
|
|
data-initial-paused="<%= @session.paused? %>">
|
|
|
|
<header class="regia-header">
|
|
<h1><%= @team.name %> vs <%= @match.opponent_name %></h1>
|
|
<p id="regia-subtitle"><%= t("regia.subtitle_prefix") %> <%= regia_header_subtitle(@match, @score) %></p>
|
|
<span id="regia-badge" class="regia-badge <%= @stream_closed ? 'regia-badge--ended' : (@session.paused? ? 'regia-badge--wait' : (@on_air ? 'regia-badge--live' : 'regia-badge--wait')) %>">
|
|
<%= @stream_closed ? t("regia.status.ended") : (@session.paused? ? t("regia.status.paused") : (@on_air ? t("regia.status.live") : t("regia.status.waiting"))) %>
|
|
</span>
|
|
</header>
|
|
|
|
<% if @live_share_url.present? %>
|
|
<div class="regia-share-group">
|
|
<p class="regia-share-label"><%= t("regia.live_share_label") %></p>
|
|
<div class="regia-share">
|
|
<button type="button" class="regia-btn regia-btn--outline" id="btn-share-live" style="margin:0">
|
|
<%= t("regia.share_live") %>
|
|
</button>
|
|
<button type="button" class="regia-btn regia-btn--outline" id="btn-copy-live" style="margin:0">
|
|
<%= t("regia.copy_link") %>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<% end %>
|
|
|
|
<div class="regia-share-group">
|
|
<p class="regia-share-label"><%= t("regia.regia_share_label") %></p>
|
|
<div class="regia-share">
|
|
<button type="button" class="regia-btn regia-btn--outline" id="btn-share-regia" style="margin:0">
|
|
<%= t("regia.share_regia") %>
|
|
</button>
|
|
<button type="button" class="regia-btn regia-btn--outline" id="btn-copy-regia" style="margin:0">
|
|
<%= t("regia.copy_link") %>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="regia-preview">
|
|
<% unless @stream_closed %>
|
|
<video id="regia-preview" playsinline muted autoplay></video>
|
|
<% end %>
|
|
<div id="regia-preview-placeholder" class="regia-preview__placeholder">
|
|
<%= @stream_closed ? t("regia.preview_ended") : t("regia.preview_waiting") %>
|
|
</div>
|
|
</div>
|
|
|
|
<section class="regia-scoreboard">
|
|
<%= render regia_board_partial(@match) %>
|
|
</section>
|
|
|
|
<% unless @stream_closed %>
|
|
<button type="button" class="regia-btn regia-btn--outline" id="btn-pause"><%= @session.paused? ? t("regia.resume") : t("regia.pause") %></button>
|
|
<button type="button" class="regia-btn regia-btn--danger" id="btn-stop"><%= t("regia.stop") %></button>
|
|
<% end %>
|
|
</div>
|
|
|
|
<div id="regia-toast" class="regia-toast" role="status"></div>
|
|
|
|
<div id="regia-modal" class="regia-modal" aria-hidden="true">
|
|
<div class="regia-modal__card">
|
|
<h2 id="modal-title"><%= t("regia.modal.set_won_title") %></h2>
|
|
<p id="modal-body"></p>
|
|
<div class="regia-modal__actions">
|
|
<button type="button" class="regia-btn regia-btn--yellow" id="modal-confirm"><%= t("regia.modal.confirm") %></button>
|
|
<button type="button" class="regia-btn regia-btn--outline" id="modal-cancel"><%= t("regia.modal.cancel") %></button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="/regia.js?v=8"></script>
|