Whitelist: plates added to /whitelist are silently ignored on detection — no clip, no frames, no DB entry. Manageable via /whitelist page or from the event detail page per-event. Stats: /stats shows all known plates ranked by passage count, with first/last seen dates and one-click whitelist toggle. Navigation links added to the index header. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
83 lines
4.1 KiB
HTML
83 lines
4.1 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="fr">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>CamWatch — Liste blanche</title>
|
|
<script src="https://cdn.tailwindcss.com"></script>
|
|
<style>
|
|
body { background: #0f172a; color: #e2e8f0; }
|
|
.card { background: #1e293b; border: 1px solid #334155; border-radius: 12px; }
|
|
.plate { font-family: monospace; letter-spacing: 0.12em; }
|
|
.btn-ghost { background: #1e293b; border: 1px solid #475569; color: #94a3b8; border-radius: 6px; padding: 6px 14px; font-size: 0.85rem; text-decoration: none; display: inline-block; }
|
|
.btn-ghost:hover { background: #334155; color: #e2e8f0; }
|
|
label { color: #64748b; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; }
|
|
input[type=text] { background: #0f172a; border: 1px solid #475569; color: #e2e8f0; border-radius: 6px; padding: 6px 10px; width: 100%; }
|
|
input[type=text]:focus { outline: none; border-color: #60a5fa; }
|
|
</style>
|
|
</head>
|
|
<body class="min-h-screen">
|
|
|
|
<header class="sticky top-0 z-10 px-4 py-3 flex items-center gap-3" style="background:#0f172a;border-bottom:1px solid #1e293b;">
|
|
<a href="/" class="btn-ghost">← Retour</a>
|
|
<span class="text-xl">🛡</span>
|
|
<span class="font-bold flex-1">Liste blanche</span>
|
|
<a href="/stats" class="btn-ghost">📊 Stats</a>
|
|
</header>
|
|
|
|
<main class="max-w-2xl mx-auto px-3 py-5 space-y-5">
|
|
|
|
<!-- Add form -->
|
|
<div class="card p-4">
|
|
<p class="text-slate-300 text-sm mb-3">Les plaques listées ici sont <strong class="text-white">ignorées automatiquement</strong> — aucun événement ni fichier ne sera créé lors de leur passage.</p>
|
|
<form action="/whitelist/add" method="post" class="flex gap-2 flex-wrap">
|
|
<input type="hidden" name="back" value="/whitelist">
|
|
<input type="text" name="plate" placeholder="Plaque (ex: AB-123-CD)" class="flex-1 uppercase font-mono" style="min-width:140px;">
|
|
<input type="text" name="label" placeholder="Libellé (ex: Ma voiture)" class="flex-1" style="min-width:160px;">
|
|
<button type="submit" class="px-4 py-2 rounded text-sm font-medium" style="background:#166534;color:#4ade80;border:1px solid #16a34a;">+ Ajouter</button>
|
|
</form>
|
|
</div>
|
|
|
|
<!-- List -->
|
|
{% if not entries %}
|
|
<div class="text-center py-12 text-slate-500">
|
|
<div class="text-4xl mb-3">🛡</div>
|
|
<p>Aucune plaque en liste blanche.</p>
|
|
</div>
|
|
{% else %}
|
|
<div class="card overflow-hidden">
|
|
<table class="w-full text-sm">
|
|
<thead>
|
|
<tr class="border-b border-slate-700">
|
|
<th class="text-left px-4 py-3 text-slate-400 font-semibold">Plaque</th>
|
|
<th class="text-left px-4 py-3 text-slate-400 font-semibold">Libellé</th>
|
|
<th class="text-left px-4 py-3 text-slate-400 font-semibold hidden sm:table-cell">Ajoutée le</th>
|
|
<th class="px-4 py-3"></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for e in entries %}
|
|
<tr class="border-b border-slate-800 hover:bg-slate-800/40">
|
|
<td class="px-4 py-3">
|
|
<span class="plate font-bold px-3 py-1 rounded text-sm" style="background:#14532d;color:#4ade80;border:1px solid #16a34a;">{{ e.plate }}</span>
|
|
</td>
|
|
<td class="px-4 py-3 text-slate-300">{{ e.label or '—' }}</td>
|
|
<td class="px-4 py-3 text-slate-500 text-xs hidden sm:table-cell">{{ e.added_str }}</td>
|
|
<td class="px-4 py-3 text-right">
|
|
<form action="/whitelist/remove/{{ e.plate }}" method="post" class="inline"
|
|
onsubmit="return confirm('Retirer {{ e.plate }} de la liste blanche ?')">
|
|
<input type="hidden" name="back" value="/whitelist">
|
|
<button type="submit" class="text-xs text-red-400 hover:text-red-300 px-2 py-1 rounded border border-red-900 hover:border-red-700">✕ Retirer</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% endif %}
|
|
|
|
</main>
|
|
</body>
|
|
</html>
|