Permette titolo, testo e link diversi per Android e iOS negli avvisi.
Separa i canali app e mostra il nodo ingest nelle sessioni admin. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -19,8 +19,12 @@
|
||||
<fieldset class="admin-channels">
|
||||
<legend><%= t("admin.announcements.form.channels") %></legend>
|
||||
<label class="admin-checkbox">
|
||||
<%= f.check_box :show_on_app %>
|
||||
<span><%= t("admin.announcements.channels.app") %></span>
|
||||
<%= f.check_box :show_on_android %>
|
||||
<span><%= t("admin.announcements.channels.android") %></span>
|
||||
</label>
|
||||
<label class="admin-checkbox">
|
||||
<%= f.check_box :show_on_ios %>
|
||||
<span><%= t("admin.announcements.channels.ios") %></span>
|
||||
</label>
|
||||
<label class="admin-checkbox">
|
||||
<%= f.check_box :show_on_web_public %>
|
||||
@@ -43,6 +47,59 @@
|
||||
<%= f.text_area :body, required: true, rows: 5, maxlength: 2000 %>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<%= f.label :action_url, t("admin.announcements.form.action_url") %>
|
||||
<%= f.url_field :action_url, placeholder: "https://" %>
|
||||
</div>
|
||||
<p class="muted admin-form-hint"><%= t("admin.announcements.form.action_url_hint") %></p>
|
||||
|
||||
<div>
|
||||
<%= f.label :action_label, t("admin.announcements.form.action_label") %>
|
||||
<%= f.text_field :action_label, maxlength: 40 %>
|
||||
</div>
|
||||
|
||||
<fieldset class="admin-channels admin-platform-copy">
|
||||
<legend><%= t("admin.announcements.form.android_override") %></legend>
|
||||
<p class="muted admin-form-hint"><%= t("admin.announcements.form.platform_override_hint") %></p>
|
||||
<div>
|
||||
<%= f.label :android_title, t("admin.announcements.form.title") %>
|
||||
<%= f.text_field :android_title, maxlength: 120 %>
|
||||
</div>
|
||||
<div>
|
||||
<%= f.label :android_body, t("admin.announcements.form.body") %>
|
||||
<%= f.text_area :android_body, rows: 4, maxlength: 2000 %>
|
||||
</div>
|
||||
<div>
|
||||
<%= f.label :android_action_url, t("admin.announcements.form.action_url") %>
|
||||
<%= f.url_field :android_action_url, placeholder: "https://play.google.com/..." %>
|
||||
</div>
|
||||
<div>
|
||||
<%= f.label :android_action_label, t("admin.announcements.form.action_label") %>
|
||||
<%= f.text_field :android_action_label, maxlength: 40 %>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="admin-channels admin-platform-copy">
|
||||
<legend><%= t("admin.announcements.form.ios_override") %></legend>
|
||||
<p class="muted admin-form-hint"><%= t("admin.announcements.form.platform_override_hint") %></p>
|
||||
<div>
|
||||
<%= f.label :ios_title, t("admin.announcements.form.title") %>
|
||||
<%= f.text_field :ios_title, maxlength: 120 %>
|
||||
</div>
|
||||
<div>
|
||||
<%= f.label :ios_body, t("admin.announcements.form.body") %>
|
||||
<%= f.text_area :ios_body, rows: 4, maxlength: 2000 %>
|
||||
</div>
|
||||
<div>
|
||||
<%= f.label :ios_action_url, t("admin.announcements.form.action_url") %>
|
||||
<%= f.url_field :ios_action_url, placeholder: "https://apps.apple.com/..." %>
|
||||
</div>
|
||||
<div>
|
||||
<%= f.label :ios_action_label, t("admin.announcements.form.action_label") %>
|
||||
<%= f.text_field :ios_action_label, maxlength: 40 %>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<div class="admin-form-row">
|
||||
<div>
|
||||
<%= f.label :starts_at, t("admin.announcements.form.starts_at") %>
|
||||
@@ -55,17 +112,6 @@
|
||||
</div>
|
||||
<p class="muted admin-form-hint"><%= t("admin.announcements.form.window_hint") %></p>
|
||||
|
||||
<div>
|
||||
<%= f.label :action_url, t("admin.announcements.form.action_url") %>
|
||||
<%= f.url_field :action_url, placeholder: "https://" %>
|
||||
</div>
|
||||
<p class="muted admin-form-hint"><%= t("admin.announcements.form.action_url_hint") %></p>
|
||||
|
||||
<div>
|
||||
<%= f.label :action_label, t("admin.announcements.form.action_label") %>
|
||||
<%= f.text_field :action_label, maxlength: 40 %>
|
||||
</div>
|
||||
|
||||
<label class="admin-checkbox">
|
||||
<%= f.check_box :dismissible %>
|
||||
<span><%= t("admin.announcements.form.dismissible") %></span>
|
||||
|
||||
@@ -107,6 +107,7 @@
|
||||
<tr>
|
||||
<th><%= t("admin.dashboard.sessions.table.match") %></th>
|
||||
<th><%= t("admin.dashboard.sessions.table.status") %></th>
|
||||
<th><%= t("admin.dashboard.sessions.table.ingest") %></th>
|
||||
<th><%= t("admin.dashboard.sessions.table.start") %></th>
|
||||
<th><%= t("admin.dashboard.sessions.table.link") %></th>
|
||||
<th></th>
|
||||
@@ -117,6 +118,7 @@
|
||||
<tr>
|
||||
<td><%= s.match.team.name %> vs <%= s.match.opponent_name %></td>
|
||||
<td><span class="badge badge--<%= s.status == 'live' ? 'live' : (s.status == 'paused' ? 'paused' : 'connecting') %>"><%= s.status %></span></td>
|
||||
<td><%= render "admin/sessions/ingest_cell", session: s %></td>
|
||||
<td class="muted"><%= s.started_at&.strftime("%d/%m %H:%M") || t("admin.common.dash") %></td>
|
||||
<td class="admin-link-compact">
|
||||
<% admin_session_watch_links(s).each do |link| %>
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<% node = session.stream_node %>
|
||||
<% if node %>
|
||||
<div class="admin-ingest">
|
||||
<code class="admin-ingest__slug"><%= node.slug %></code>
|
||||
<span class="badge <%= admin_session_ingest_badge_class(node) %>"><%= admin_session_ingest_role_label(node) %></span>
|
||||
</div>
|
||||
<% else %>
|
||||
<span class="muted"><%= t("admin.sessions.ingest.none") %></span>
|
||||
<% end %>
|
||||
@@ -4,6 +4,7 @@
|
||||
<tr>
|
||||
<th><%= t("admin.sessions.index.table.match") %></th>
|
||||
<th><%= t("admin.sessions.index.table.status") %></th>
|
||||
<th><%= t("admin.sessions.index.table.ingest") %></th>
|
||||
<th><%= t("admin.sessions.index.table.disconnects") %></th>
|
||||
<th><%= t("admin.sessions.index.table.link") %></th>
|
||||
<th></th>
|
||||
@@ -14,6 +15,7 @@
|
||||
<tr>
|
||||
<td><%= s.match.team.name %> vs <%= s.match.opponent_name %></td>
|
||||
<td><span class="badge <%= s.status == 'live' ? 'badge--live' : 'badge--paused' %>"><%= s.status %></span></td>
|
||||
<td><%= render "admin/sessions/ingest_cell", session: s %></td>
|
||||
<td><%= s.disconnection_count %></td>
|
||||
<td class="admin-link-compact">
|
||||
<% admin_session_watch_links(s).each do |link| %>
|
||||
|
||||
@@ -16,6 +16,16 @@
|
||||
<% if @session.youtube_broadcast_id %>
|
||||
<p><%= t("admin.sessions.show.youtube_studio") %>: <a href="https://studio.youtube.com/video/<%= @session.youtube_broadcast_id %>/livestreaming" target="_blank" rel="noopener"><%= t("admin.sessions.show.broadcast") %></a></p>
|
||||
<% end %>
|
||||
<p>
|
||||
<%= t("admin.sessions.show.ingest_node") %>
|
||||
<% if @session.stream_node %>
|
||||
<code><%= @session.stream_node.slug %></code>
|
||||
<span class="badge <%= admin_session_ingest_badge_class(@session.stream_node) %>"><%= admin_session_ingest_role_label(@session.stream_node) %></span>
|
||||
<span class="muted">(<%= @session.stream_node.provider %>)</span>
|
||||
<% else %>
|
||||
<span class="muted"><%= t("admin.sessions.ingest.none") %></span>
|
||||
<% end %>
|
||||
</p>
|
||||
<p><%= t("admin.sessions.show.rtmp_ingest") %> <code><%= @session.rtmp_ingest_url %></code></p>
|
||||
|
||||
<h3><%= t("admin.sessions.show.events_title") %></h3>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<title><%= t("admin.layout.title") %></title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link rel="stylesheet" href="/admin.css?v=6">
|
||||
<link rel="stylesheet" href="/admin.css?v=8">
|
||||
<% if content_for?(:replay_archive_styles) %>
|
||||
<link rel="stylesheet" href="/marketing.css?v=42">
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user