🚀 Patch auto
This commit is contained in:
@@ -1,14 +1,28 @@
|
||||
<!doctype html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<title>Super Sunday — Admin</title>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="/assets/style.css?v=4" />
|
||||
|
||||
<title>Super Sunday — Admin</title>
|
||||
<link rel="stylesheet" href="/assets/style.css?v=10" />
|
||||
<style>
|
||||
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
|
||||
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:16px}
|
||||
.actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
|
||||
.muted-sm{color:#9fb0c7;font-size:13px}
|
||||
.toast{position:fixed;right:16px;bottom:16px;padding:12px 16px;
|
||||
background:#0f1b33;border:1px solid rgba(255,255,255,.2);color:#eaf3ff;
|
||||
border-radius:14px;box-shadow:0 8px 24px rgba(0,0,0,.35);display:none;min-width:260px}
|
||||
.toast.show{display:block;animation:toastIn .18s ease-out}
|
||||
@keyframes toastIn{from{transform:translateY(6px);opacity:.0}to{transform:translateY(0);opacity:1}}
|
||||
.spinner{display:inline-block;width:16px;height:16px;border-radius:50%;
|
||||
border:2px solid rgba(255,255,255,.25);border-top-color:#8fedff;animation:spin .6s linear infinite;margin-left:8px}
|
||||
@keyframes spin{to{transform:rotate(360deg)}}
|
||||
.help{font-size:12px;color:#cfe1ff;margin-top:4px}
|
||||
.sel{display:flex;gap:8px}
|
||||
.sel select{min-width:160px}
|
||||
.hide{display:none !important}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
@@ -21,64 +35,85 @@
|
||||
</header>
|
||||
|
||||
<main class="container">
|
||||
<section class="card accent" style="padding:22px; margin:8px 0 18px;">
|
||||
<div class="kicker">Organisation</div>
|
||||
<h2 class="hero-title">Pilote tes tournois</h2>
|
||||
<p class="muted">Création rapide, génération Americano, scoring en deux clics.</p>
|
||||
</section>
|
||||
|
||||
<!-- Login -->
|
||||
<section id="loginSection" class="card">
|
||||
<h2 class="section-title">Connexion</h2>
|
||||
<input id="email" placeholder="Email" />
|
||||
<input id="password" type="password" placeholder="Mot de passe" />
|
||||
<button id="loginBtn" class="btn">Se connecter</button>
|
||||
<p id="loginStatus" class="muted"></p>
|
||||
<div class="form-row">
|
||||
<input id="email" placeholder="Email (ex: admin@supersunday.local)" />
|
||||
<input id="password" type="password" placeholder="Mot de passe (ex: changeme)" />
|
||||
</div>
|
||||
<div class="actions">
|
||||
<button id="loginBtn" class="btn">Se connecter</button>
|
||||
<button id="logoutBtn" class="btn-outline">Se déconnecter</button>
|
||||
<span id="loginStatus" class="muted"></span>
|
||||
</div>
|
||||
<p class="muted-sm">Identifiants dans <code>backend/.env</code> (ADMIN_EMAIL / ADMIN_PASSWORD).</p>
|
||||
</section>
|
||||
|
||||
<section id="adminSection" style="display:none;">
|
||||
<h2 class="section-title">Actions rapides</h2>
|
||||
<div class="grid">
|
||||
<div class="card">
|
||||
<h3>Créer un tournoi</h3>
|
||||
<input id="t_name" placeholder="Nom" />
|
||||
<input id="t_loc" placeholder="Lieu" />
|
||||
<input id="t_sd" type="date" />
|
||||
<input id="t_ed" type="date" />
|
||||
<button onclick="createTournament()" class="btn">Créer</button>
|
||||
<section id="adminSection" class="grid-2 hide">
|
||||
<!-- Create tournament -->
|
||||
<div class="card">
|
||||
<h3 class="section-title">Créer un tournoi</h3>
|
||||
<input id="t_name" placeholder="Nom du tournoi" />
|
||||
<input id="t_location" placeholder="Lieu" />
|
||||
<div class="form-row">
|
||||
<input id="t_start" type="date" placeholder="Date début" />
|
||||
<input id="t_end" type="date" placeholder="Date fin" />
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<h3>Générer Americano</h3>
|
||||
<input id="g_tid" placeholder="Tournament ID" />
|
||||
<input id="g_courts" placeholder="Courts (ex: Court 1,Court 2)" />
|
||||
<input id="g_start" type="datetime-local" />
|
||||
<input id="g_int" type="number" value="20" />
|
||||
<button onclick="generateAmericano()" class="btn">Générer</button>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<h3>Score Match</h3>
|
||||
<input id="m_id" placeholder="Match ID" />
|
||||
<input id="m_a" type="number" placeholder="Score A" />
|
||||
<input id="m_b" type="number" placeholder="Score B" />
|
||||
<button onclick="scoreMatch()" class="btn">Valider</button>
|
||||
<div class="actions">
|
||||
<button id="createTournamentBtn" class="btn">Créer</button>
|
||||
<div id="createTournamentSpin" class="spinner hide"></div>
|
||||
</div>
|
||||
<div id="createTournamentErr" class="help"></div>
|
||||
</div>
|
||||
|
||||
<h2 class="section-title">Tournaments</h2>
|
||||
<pre id="adminTournaments"></pre>
|
||||
<h2 class="section-title">Matches</h2>
|
||||
<pre id="adminMatches"></pre>
|
||||
<!-- Add participant -->
|
||||
<div class="card">
|
||||
<h3 class="section-title">Ajouter un joueur</h3>
|
||||
<div class="sel">
|
||||
<select id="p_tid"></select>
|
||||
<input id="p_fullname" placeholder="Nom complet" />
|
||||
</div>
|
||||
<div class="actions">
|
||||
<button id="addParticipantBtn" class="btn">Ajouter</button>
|
||||
<div id="addParticipantSpin" class="spinner hide"></div>
|
||||
</div>
|
||||
<div id="addParticipantErr" class="help"></div>
|
||||
</div>
|
||||
|
||||
<!-- Score match -->
|
||||
<div class="card">
|
||||
<h3 class="section-title">Scorer un match</h3>
|
||||
<div class="sel">
|
||||
<select id="s_tid"></select>
|
||||
<select id="s_mid"></select>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<input id="m_a" type="number" placeholder="Score A" min="0" />
|
||||
<input id="m_b" type="number" placeholder="Score B" min="0" />
|
||||
</div>
|
||||
<div class="actions">
|
||||
<label><input id="m_done" type="checkbox" /> Terminé</label>
|
||||
<button id="scoreBtn" class="btn">Valider</button>
|
||||
<div id="scoreSpin" class="spinner hide"></div>
|
||||
</div>
|
||||
<div id="scoreErr" class="help"></div>
|
||||
</div>
|
||||
|
||||
<!-- Quick view tournaments -->
|
||||
<div class="card">
|
||||
<h3 class="section-title">Tournois (aperçu)</h3>
|
||||
<div class="actions">
|
||||
<button id="refreshTournaments" class="btn-outline">Rafraîchir</button>
|
||||
</div>
|
||||
<div id="listTournaments" class="muted"></div>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<div class="bg-bubble b1"></div>
|
||||
<div class="bg-bubble b2"></div>
|
||||
<div class="bg-bubble b3"></div>
|
||||
<div class="bg-bubble b4"></div>
|
||||
<div class="bg-bubble b5"></div>
|
||||
<div id="toast" class="toast" role="status" aria-live="polite"></div>
|
||||
|
||||
<script src="/assets/api.js"></script>
|
||||
<script src="/assets/admin.js"></script>
|
||||
<script type="module" src="/assets/api.js?v=10"></script>
|
||||
<script type="module" src="/assets/admin.ux.js?v=10"></script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user