Admin protetto, dashboard KPI e aggiornamenti sito marketing.
Login admin con cambio password, metriche server (CPU/RAM/disco/banda), grafici e statistiche streaming; sezione piani ridimensionata. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -3,30 +3,31 @@
|
||||
<head>
|
||||
<title>Match Live TV Admin</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<style>
|
||||
:root { --red: #FF2D2D; --bg: #0A0A0A; --card: #1E1E1E; --text: #fff; }
|
||||
* { box-sizing: border-box; }
|
||||
body { font-family: system-ui, sans-serif; background: var(--bg); color: var(--text); margin: 0; padding: 1rem 2rem; }
|
||||
a { color: var(--red); }
|
||||
header { border-bottom: 1px solid #333; padding-bottom: 1rem; margin-bottom: 2rem; }
|
||||
h1 span { color: var(--red); }
|
||||
table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: 8px; overflow: hidden; }
|
||||
th, td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid #333; }
|
||||
.badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 4px; font-size: 0.8rem; }
|
||||
.live { background: var(--red); }
|
||||
.ended { background: #555; }
|
||||
nav a { margin-right: 1rem; }
|
||||
</style>
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<link rel="stylesheet" href="/admin.css?v=1">
|
||||
<% if controller_name == "dashboard" %>
|
||||
<script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.1/dist/chart.umd.min.js" crossorigin="anonymous"></script>
|
||||
<script src="/admin-dashboard.js?v=1" defer></script>
|
||||
<% end %>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<body class="<%= content_for?(:body_class) ? yield(:body_class) : 'admin-body' %>">
|
||||
<header class="admin-header">
|
||||
<h1>MATCH <span>LIVE</span> TV — Admin</h1>
|
||||
<nav>
|
||||
<%= link_to "Dashboard", admin_root_path %>
|
||||
<%= link_to "Teams", admin_teams_path %>
|
||||
<%= link_to "Sessions", admin_sessions_path %>
|
||||
<nav class="admin-nav">
|
||||
<% if admin_logged_in? %>
|
||||
<%= link_to "Dashboard", admin_root_path, class: ("active" if controller_name == "dashboard") %>
|
||||
<%= link_to "Teams", admin_teams_path, class: ("active" if controller_name == "teams") %>
|
||||
<%= link_to "Sessions", admin_sessions_path, class: ("active" if controller_name == "sessions") %>
|
||||
<%= link_to "Password", edit_admin_password_path %>
|
||||
<%= button_to "Esci", admin_logout_path, method: :delete %>
|
||||
<% end %>
|
||||
</nav>
|
||||
</header>
|
||||
<%= yield %>
|
||||
|
||||
<main class="admin-main">
|
||||
<% if flash[:notice] %><div class="admin-flash"><%= flash[:notice] %></div><% end %>
|
||||
<% if flash[:alert] %><div class="admin-flash"><%= flash[:alert] %></div><% end %>
|
||||
<%= yield %>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<title><%= content_for?(:title) ? yield(:title) : "Match Live TV" %></title>
|
||||
<%= render "shared/meta_tags" %>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css" integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A==" crossorigin="anonymous" referrerpolicy="no-referrer">
|
||||
<link rel="stylesheet" href="/marketing.css?v=14">
|
||||
<link rel="stylesheet" href="/marketing.css?v=15">
|
||||
</head>
|
||||
<body>
|
||||
<%= render "shared/marketing_nav" %>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<title><%= content_for?(:title) ? yield(:title) : "Match Live TV" %></title>
|
||||
<%= render "shared/meta_tags" %>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css" integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A==" crossorigin="anonymous" referrerpolicy="no-referrer">
|
||||
<link rel="stylesheet" href="/marketing.css?v=14">
|
||||
<link rel="stylesheet" href="/marketing.css?v=15">
|
||||
<link rel="stylesheet" href="/live.css">
|
||||
<%= yield :head %>
|
||||
</head>
|
||||
|
||||
Reference in New Issue
Block a user