Aggiunge i18n IT/EN/FR/DE/ES, pagine pubbliche squadre e UX archivio.

Il selettore lingua funziona sul web e sulle app native; su Android la preferenza è persistita e applicata al riavvio. Incluse anche eliminazione replay a scope e campi pagina pubblica squadra.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-23 19:30:44 +02:00
co-authored by Cursor
parent 7d5d66840f
commit 1d97271555
71 changed files with 3509 additions and 197 deletions
@@ -135,29 +135,56 @@
</td>
<td class="replay-archive-table__col-status">
<span class="replay-archive__status replay-archive__status--<%= rec.status %>"><%= rec.status_label %></span>
<%= form_with url: paths.update.call(rec), method: :patch, local: true, class: "replay-archive__privacy-form" do %>
<% filter_params.each { |key, value| concat hidden_field_tag(key, value) } %>
<%= select_tag "recording[privacy_status]",
options_for_select([["Pubblico", "public"], ["Privato", "unlisted"]], rec.privacy_status),
class: "replay-archive__privacy-select",
onchange: "this.form.submit()" %>
<% end %>
</td>
<td class="replay-archive-table__col-actions">
<div class="replay-archive__actions">
<% next_privacy = rec.publicly_listed? ? "unlisted" : "public" %>
<% privacy_label = rec.publicly_listed? ? "Pubblico" : "Privato" %>
<% privacy_hint = rec.publicly_listed? ? "Visibile a tutti — clicca per rendere privato" : "Solo con link — clicca per rendere pubblico" %>
<%= button_to paths.update.call(rec),
method: :patch,
params: filter_params.merge(recording: { privacy_status: next_privacy }),
class: "replay-archive__privacy-toggle replay-archive__privacy-toggle--#{rec.privacy_status}",
title: "#{privacy_label}: #{privacy_hint}",
form: { class: "replay-archive__privacy-form" } do %>
<% if rec.publicly_listed? %>
<svg class="replay-archive__privacy-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false">
<circle cx="12" cy="12" r="9" fill="none" stroke="currentColor" stroke-width="1.8"/>
<path d="M3 12h18M12 3c2.8 2.6 4.2 5.6 4.2 9s-1.4 6.4-4.2 9c-2.8-2.6-4.2-5.6-4.2-9S9.2 5.6 12 3z" fill="none" stroke="currentColor" stroke-width="1.8"/>
</svg>
<% else %>
<svg class="replay-archive__privacy-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false">
<rect x="5" y="11" width="14" height="10" rx="2" fill="none" stroke="currentColor" stroke-width="1.8"/>
<path d="M8 11V8a4 4 0 0 1 8 0v3" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/>
</svg>
<% end %>
<span class="visually-hidden"><%= privacy_label %></span>
<% end %>
<% if ent.phone_download_enabled? && rec.ready? %>
<%= link_to "MP4", public_replay_download_path(rec.stream_session_id), class: "replay-archive__action replay-archive__action--secondary", title: "Scarica MP4" %>
<% end %>
<% if ent.premium_full? && ent.youtube_enabled? && rec.ready? && rec.youtube_video_id.blank? %>
<%= button_to "YT", paths.publish_youtube.call(rec), method: :post, class: "replay-archive__action replay-archive__action--secondary", title: "Pubblica su YouTube" %>
<%= button_to "YT", paths.publish_youtube.call(rec), method: :post, class: "replay-archive__action replay-archive__action--secondary", title: "Pubblica su YouTube", form: { class: "replay-archive__action-form" } %>
<% elsif rec.youtube_watch_url %>
<%= link_to "YT", rec.youtube_watch_url, class: "replay-archive__action replay-archive__action--secondary", target: "_blank", rel: "noopener", title: "Apri su YouTube" %>
<% end %>
<% has_youtube = rec.youtube_video_id.present? && !rec.youtube_video_id.to_s.start_with?("mock_") %>
<% has_site = rec.storage_key.present? || %w[ready processing failed].include?(rec.status) %>
<% delete_confirm = "Scegli dove eliminare il replay. L'operazione è irreversibile." %>
<%= button_to paths.destroy.call(rec), method: :delete,
params: filter_params,
class: "replay-archive__action replay-archive__action--danger",
title: "Elimina replay",
form: { data: { turbo_confirm: "Eliminare definitivamente questo replay? Verranno rimossi i file sul server e il video YouTube collegato." }, class: "replay-archive__action-form" } do %>
form: {
class: "replay-archive__action-form",
data: {
confirm: delete_confirm,
turbo_confirm: delete_confirm,
confirm_mode: "delete-replay",
has_site: has_site ? "1" : "0",
has_youtube: has_youtube ? "1" : "0"
}
} do %>
<% end %>
</div>