Limita una diretta attiva per account e valorizza la copertina Premium Full.
Blocca la seconda diretta sullo stesso utente, registra gli abusi in admin e presenta la copertina come grafica caricata dalla società, con demo Team MLTV. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,67 @@
|
||||
<% if violations.any? %>
|
||||
<div class="admin-table-wrap">
|
||||
<table class="admin-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><%= t("admin.stream_concurrency.table.when") %></th>
|
||||
<th><%= t("admin.stream_concurrency.table.account") %></th>
|
||||
<th><%= t("admin.stream_concurrency.table.club") %></th>
|
||||
<th><%= t("admin.stream_concurrency.table.occupying") %></th>
|
||||
<th><%= t("admin.stream_concurrency.table.attempted") %></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% violations.each do |row| %>
|
||||
<tr class="<%= 'admin-row--two-devices' if row.devices_differ? %>">
|
||||
<td class="muted"><%= admin_datetime(row.created_at, with_seconds: true) %></td>
|
||||
<td>
|
||||
<strong><%= row.user_name.presence || t("admin.common.dash") %></strong>
|
||||
<div class="muted" style="font-size:0.85rem"><%= row.user_email %></div>
|
||||
</td>
|
||||
<td>
|
||||
<% if row.attempted_club %>
|
||||
<%= link_to row.club_name, admin_club_path(row.attempted_club) %>
|
||||
<% elsif row.occupying_club %>
|
||||
<%= link_to row.club_name, admin_club_path(row.occupying_club) %>
|
||||
<% else %>
|
||||
<%= row.club_name.presence || t("admin.common.dash") %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td>
|
||||
<% if row.occupying_session %>
|
||||
<%= link_to row.occupying_match_label, admin_session_path(row.occupying_session) %>
|
||||
<% else %>
|
||||
<%= row.occupying_match_label %>
|
||||
<% end %>
|
||||
<div class="muted" style="font-size:0.85rem;margin-top:0.2rem">
|
||||
<span class="badge <%= admin_session_status_badge_class(row.occupying_status) %>"><%= row.occupying_status %></span>
|
||||
<%= row.occupying_device.presence || t("admin.common.dash") %>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<% if row.attempted_session %>
|
||||
<%= link_to row.attempted_match_label, admin_session_path(row.attempted_session) %>
|
||||
<% else %>
|
||||
<%= row.attempted_match_label %>
|
||||
<% end %>
|
||||
<div class="muted" style="font-size:0.85rem;margin-top:0.2rem">
|
||||
<%= t("admin.stream_concurrency.action.#{row.attempt_action}") %>
|
||||
· <%= row.attempted_device.presence || t("admin.common.dash") %>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<% if row.devices_differ? %>
|
||||
<span class="badge badge--abuse"><%= t("admin.stream_concurrency.badge.two_devices") %></span>
|
||||
<% else %>
|
||||
<span class="muted"><%= t("admin.stream_concurrency.badge.same_or_unknown") %></span>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<% else %>
|
||||
<p class="empty"><%= t(empty_key) %></p>
|
||||
<% end %>
|
||||
@@ -0,0 +1,48 @@
|
||||
<% content_for :body_class, "admin-body" %>
|
||||
|
||||
<div class="admin-page-head">
|
||||
<h2 class="admin-page-title"><%= t("admin.stream_concurrency.index.title") %></h2>
|
||||
<p class="muted admin-page-sub"><%= t("admin.stream_concurrency.index.lead") %></p>
|
||||
</div>
|
||||
|
||||
<section class="kpi-grid">
|
||||
<div class="kpi-card <%= @lookback_count.positive? ? 'kpi-card--accent' : '' %>">
|
||||
<div class="kpi-label"><%= t("admin.stream_concurrency.kpi.lookback") %></div>
|
||||
<div class="kpi-value"><%= @lookback_count %></div>
|
||||
<div class="kpi-sub"><%= t("admin.stream_concurrency.kpi.lookback_sub") %></div>
|
||||
</div>
|
||||
<div class="kpi-card <%= @two_devices_count.positive? ? 'kpi-card--danger' : '' %>">
|
||||
<div class="kpi-label"><%= t("admin.stream_concurrency.kpi.two_devices") %></div>
|
||||
<div class="kpi-value"><%= @two_devices_count %></div>
|
||||
<div class="kpi-sub"><%= t("admin.stream_concurrency.kpi.two_devices_sub") %></div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div class="panel admin-sessions-filters">
|
||||
<%= form_with url: admin_stream_concurrency_violations_path, method: :get, local: true, class: "admin-filter-form" do %>
|
||||
<div class="admin-filter-grid">
|
||||
<label class="admin-filter-field">
|
||||
<span><%= t("admin.stream_concurrency.filters.q") %></span>
|
||||
<%= text_field_tag :q, @filters[:q], placeholder: t("admin.stream_concurrency.filters.q_placeholder") %>
|
||||
</label>
|
||||
<label class="admin-filter-field admin-filter-field--check">
|
||||
<span><%= t("admin.stream_concurrency.filters.two_devices") %></span>
|
||||
<label class="admin-checkbox">
|
||||
<%= check_box_tag :devices_differ, "1", @filters[:devices_differ] %>
|
||||
<%= t("admin.stream_concurrency.filters.two_devices_hint") %>
|
||||
</label>
|
||||
</label>
|
||||
</div>
|
||||
<div class="admin-filter-actions">
|
||||
<%= submit_tag t("admin.stream_concurrency.filters.apply"), class: "admin-btn admin-btn--primary admin-btn--sm" %>
|
||||
<%= link_to t("admin.stream_concurrency.filters.reset"), admin_stream_concurrency_violations_path, class: "admin-btn admin-btn--outline admin-btn--sm" %>
|
||||
<span class="muted admin-filter-count">
|
||||
<%= t("admin.stream_concurrency.index.results", shown: @violations.size, total: @total_count) %>
|
||||
</span>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="panel">
|
||||
<%= render "admin/stream_concurrency_violations/table", violations: @violations, empty_key: "admin.stream_concurrency.index.none" %>
|
||||
</div>
|
||||
Reference in New Issue
Block a user