Club come entità principale, branding e fix infrastruttura streaming.
Introduce clubs con abbonamento, branding Active Storage e flusso registrazione società; corregge healthcheck MediaMTX (immagine distroless) e allinea dominio produzione matchlivetv.it. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
33
backend/app/views/shared/_branding_fields.html.erb
Normal file
33
backend/app/views/shared/_branding_fields.html.erb
Normal file
@@ -0,0 +1,33 @@
|
||||
<% record = local_assigns[:record] %>
|
||||
<% show_inherit_hint = local_assigns[:show_inherit_hint] %>
|
||||
|
||||
<fieldset class="branding-fields">
|
||||
<legend><%= local_assigns[:legend] || "Identità visiva" %></legend>
|
||||
|
||||
<% if show_inherit_hint %>
|
||||
<p class="branding-hint">Lascia vuoto per usare logo e colori della società.</p>
|
||||
<% end %>
|
||||
|
||||
<%= label_tag "branding[logo_file]", "Logo (immagine)" %>
|
||||
<%= file_field_tag "branding[logo_file]", accept: "image/png,image/jpeg,image/webp" %>
|
||||
<% if record.effective_logo_url.present? %>
|
||||
<p class="branding-preview">
|
||||
<%= image_tag record.effective_logo_url, alt: "", width: 64, height: 64, style: "border-radius:8px" %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<%= label_tag "#{record.model_name.param_key}[logo_url]", "Logo (URL alternativo)" %>
|
||||
<%= text_field_tag "#{record.model_name.param_key}[logo_url]", record.logo_url, placeholder: "https://…" %>
|
||||
|
||||
<%= label_tag "#{record.model_name.param_key}[primary_color]", "Colore principale" %>
|
||||
<div class="color-field">
|
||||
<%= color_field_tag "#{record.model_name.param_key}[primary_color]", record.primary_color.presence || record.effective_primary_color %>
|
||||
<span class="color-swatch" style="background:<%= record.effective_primary_color %>"></span>
|
||||
</div>
|
||||
|
||||
<%= label_tag "#{record.model_name.param_key}[secondary_color]", "Colore secondario" %>
|
||||
<div class="color-field">
|
||||
<%= color_field_tag "#{record.model_name.param_key}[secondary_color]", record.secondary_color.presence || record.effective_secondary_color %>
|
||||
<span class="color-swatch" style="background:<%= record.effective_secondary_color %>"></span>
|
||||
</div>
|
||||
</fieldset>
|
||||
@@ -24,8 +24,12 @@
|
||||
<%= link_to "Dirette live", public_live_index_path, class: (live_section ? "nav-active" : nil) %>
|
||||
<div class="nav-actions">
|
||||
<% if logged_in? %>
|
||||
<% if current_user.teams.any? %>
|
||||
<%= link_to "Dashboard", public_team_dashboard_path(current_user.teams.first), class: "nav-link-item" %>
|
||||
<% if current_user.primary_club || current_user.manageable_teams.any? %>
|
||||
<% if current_user.primary_club %>
|
||||
<%= link_to "Società", public_club_path(current_user.primary_club), class: "nav-link-item" %>
|
||||
<% elsif current_user.manageable_teams.first %>
|
||||
<%= link_to "Dashboard", public_team_dashboard_path(current_user.manageable_teams.first), class: "nav-link-item" %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%= button_to "Esci", public_logout_path, method: :delete, class: "btn btn-secondary nav-btn" %>
|
||||
<% else %>
|
||||
|
||||
Reference in New Issue
Block a user