add dashboard to home

This commit is contained in:
Joren de Graaf
2026-10-01 17:29:29 +02:00
parent 66db97b6f7
commit b676f35f0a
24 changed files with 214 additions and 82 deletions
+1 -22
View File
@@ -24,28 +24,7 @@
<span class="hint">Audio analysis · Sensor map</span>
</div>
</main>
<section class="manual-report" aria-labelledby="manual-report-title">
<p class="eyebrow">No recording needed</p>
<h2 class="manual-report__title" id="manual-report-title">Report fireworks now</h2>
<p class="manual-report__intro">Choose how many times you heard fireworks, then send it straight to Pending. The report is timestamped now.</p>
<form id="manual-report-form" action="{% url 'fireworks_detect:submit_manual_pending' %}" method="post" hx-post="{% url 'fireworks_detect:submit_manual_pending' %}" hx-target="#manual-submission" hx-swap="outerHTML">
{% csrf_token %}
<label class="manual-report__label" for="manual-occurrences">Number of occurrences</label>
<input id="manual-latitude" name="latitude" type="hidden">
<input id="manual-longitude" name="longitude" type="hidden">
<input id="manual-direction-degrees" name="direction_degrees" type="hidden">
<input id="manual-direction-accuracy" name="direction_accuracy_degrees" type="hidden">
<input id="manual-occurrences" name="occurrences" type="number" min="1" max="1000" value="1" required inputmode="numeric">
<div class="manual-direction-panel" id="manual-direction-panel" hidden>
<strong class="manual-direction-panel__heading">Direction <span>(optional)</span></strong>
<p class="manual-direction-panel__copy">Point the top of your phone toward the fireworks, then capture a single compass reading.</p>
<button id="manual-capture-direction" class="manual-direction-panel__button" type="button">Capture direction</button>
<div id="manual-direction-status" class="manual-direction-panel__status" aria-live="polite"></div>
</div>
<button id="manual-submit" class="manual-report__submit" type="button">I heard fireworks — send to Pending</button>
</form>
<div id="manual-submission" class="manual-report__submission" aria-live="polite"></div>
</section>
{% include "fireworks_detect/includes/manual_report_form.html" %}
</div>
</body>
</html>