Phase 23 UX polish: compact layouts, collapsibles, test trip
Dashboard: - OBD stat cards more compact (py-2, h6 health values, 'OBD' label fits) - obd-val class prevents Disconnected wrapping - Speed graph collapsed by default with toggle chevron button - GPS map + coordinates merged into single card with footer coords - Pi health rows use h6 (less tall), alert py-2 Dashcam: - Device status is now a compact single-line bar - Files on dashcam section is collapsible (hidden by default) - Import status moved into the dashcam files card footer - Imported videos on Pi moved to top, open by default - Column headers trimmed (Select→empty, Actions→empty, Preview→empty) Trip history: - col-12 on mobile so list stacks above the map - Shorter column labels (Distance→km, Duration→Time, Max speed→Max) - history-map height reduced for mobile (22rem on small screens) Settings: - Cellular + ntfy merged into one collapsible card - Alert thresholds collapsible (advanced) - Phone hotspot instructions shortened - Upload retention uses inline row layout (compact) - All cards use shadow-sm, smaller headers CSS: - obd-val: word-break + smaller font for OBD status values - collapse-chevron: smooth rotation transition - #map height 18rem (was 20rem) - history-map 32rem desktop / 22rem mobile (was 36rem) Co-authored-by: Copilot <[email protected]>
This commit is contained in:
+120
-93
@@ -4,102 +4,129 @@
|
||||
{% block title %}Dashcam - Yaris OBD{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h3 class="text-dark mb-4">Dashcam</h3>
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<p class="text-primary m-0 fw-bold">Detected device</p>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<p id="dash-device-status">Checking for a USB dashcam...</p>
|
||||
<button id="dash-scan-btn" class="btn btn-secondary" type="button">Scan for dashcam</button>
|
||||
<button id="dash-import-btn" class="btn btn-primary" type="button" disabled>Import videos</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3 d-flex flex-wrap align-items-center justify-content-between gap-2">
|
||||
<div>
|
||||
<p class="text-primary m-0 fw-bold">Files on dashcam</p>
|
||||
<small id="dash-file-summary" class="text-muted">Scanning...</small>
|
||||
</div>
|
||||
<div class="d-flex gap-2">
|
||||
<button id="dash-files-refresh-btn" class="btn btn-sm btn-secondary" type="button">
|
||||
<i class="fas fa-sync-alt me-1"></i>Refresh
|
||||
</button>
|
||||
<button id="dash-select-all-btn" class="btn btn-sm btn-outline-secondary" type="button" disabled>
|
||||
Select all
|
||||
</button>
|
||||
<button id="dash-import-selected-btn" class="btn btn-sm btn-primary" type="button" disabled>
|
||||
<i class="fas fa-download me-1"></i>Import selected
|
||||
</button>
|
||||
<button id="dash-delete-all-btn" class="btn btn-sm btn-danger" type="button"
|
||||
data-confirm="Permanently delete every video from the dashcam? This cannot be undone." disabled>
|
||||
<i class="fas fa-trash me-1"></i>Delete all
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body p-0">
|
||||
{{ data_table(
|
||||
"dashcam-file-list",
|
||||
[
|
||||
{"key": "selected", "label": "Select", "sortable": false},
|
||||
{"key": "path", "label": "File", "sortable": true},
|
||||
{"key": "size", "label": "Size", "sortable": true},
|
||||
{"key": "modified", "label": "Modified", "sortable": true},
|
||||
{"key": "actions", "label": "Actions", "sortable": false}
|
||||
],
|
||||
"No videos found",
|
||||
"Connect the dashcam in USB storage mode, then refresh this list."
|
||||
) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<p class="text-primary m-0 fw-bold">Import results</p>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<p id="dash-import-status">No import has been run yet.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="local-video-player-panel" class="card shadow mb-4" hidden>
|
||||
<div class="card-header py-3 d-flex align-items-center justify-content-between">
|
||||
<p id="local-video-player-title" class="text-primary m-0 fw-bold">Video player</p>
|
||||
<button id="local-video-player-close" class="btn btn-sm btn-secondary" type="button">
|
||||
Close
|
||||
</button>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<video id="local-video-player" class="local-video-player" controls preload="metadata"></video>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3 d-flex flex-wrap align-items-center justify-content-between gap-2">
|
||||
<div>
|
||||
<p class="text-primary m-0 fw-bold">Imported videos on Pi</p>
|
||||
<small id="local-video-summary" class="text-muted">Loading...</small>
|
||||
</div>
|
||||
<button id="local-videos-refresh-btn" class="btn btn-sm btn-secondary" type="button">
|
||||
<i class="fas fa-sync-alt me-1"></i>Refresh
|
||||
</button>
|
||||
</div>
|
||||
<div class="card-body p-0">
|
||||
{{ data_table(
|
||||
"local-video-list",
|
||||
[
|
||||
{"key": "thumbnail", "label": "Preview", "sortable": false},
|
||||
{"key": "path", "label": "File", "sortable": true},
|
||||
{"key": "size", "label": "Size", "sortable": true},
|
||||
{"key": "modified", "label": "Modified", "sortable": true},
|
||||
{"key": "uploaded", "label": "Upload", "sortable": true},
|
||||
{"key": "actions", "label": "Actions", "sortable": false}
|
||||
],
|
||||
"No imported videos",
|
||||
"Import videos from the connected dashcam to browse and play them here."
|
||||
) }}
|
||||
</div>
|
||||
</div>
|
||||
<h3 class="text-dark mb-3 fw-bold">Dashcam</h3>
|
||||
|
||||
{# ── Device status bar ───────────────────────────────────────────────── #}
|
||||
<div class="card shadow-sm mb-3">
|
||||
<div class="card-body py-2 d-flex flex-wrap align-items-center gap-2">
|
||||
<i class="fas fa-usb text-muted"></i>
|
||||
<span id="dash-device-status" class="me-auto small">Checking for a USB dashcam…</span>
|
||||
<button id="dash-scan-btn" class="btn btn-sm btn-secondary" type="button">
|
||||
<i class="fas fa-search me-1"></i>Scan
|
||||
</button>
|
||||
<button id="dash-import-btn" class="btn btn-sm btn-primary" type="button" disabled>
|
||||
<i class="fas fa-download me-1"></i>Import all
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{# ── Files on dashcam (collapsible) ─────────────────────────────────── #}
|
||||
<div class="card shadow-sm mb-3">
|
||||
<div class="card-header py-2 d-flex flex-wrap align-items-center gap-2">
|
||||
<button class="btn btn-link text-primary fw-bold p-0 text-decoration-none d-flex align-items-center gap-1"
|
||||
type="button" data-bs-toggle="collapse" data-bs-target="#dashcam-files-body"
|
||||
aria-expanded="false" aria-controls="dashcam-files-body" id="dashcam-files-toggle">
|
||||
<i class="fas fa-chevron-right toggle-icon" style="font-size:.7rem;transition:transform .2s;"></i>
|
||||
Files on dashcam
|
||||
</button>
|
||||
<small id="dash-file-summary" class="text-muted ms-1"></small>
|
||||
<div class="ms-auto d-flex gap-1 flex-wrap">
|
||||
<button id="dash-files-refresh-btn" class="btn btn-sm btn-outline-secondary" type="button">
|
||||
<i class="fas fa-sync-alt"></i>
|
||||
</button>
|
||||
<button id="dash-select-all-btn" class="btn btn-sm btn-outline-secondary" type="button" disabled>All</button>
|
||||
<button id="dash-import-selected-btn" class="btn btn-sm btn-primary" type="button" disabled>
|
||||
<i class="fas fa-download me-1"></i>Import
|
||||
</button>
|
||||
<button id="dash-delete-all-btn" class="btn btn-sm btn-outline-danger" type="button"
|
||||
data-confirm="Permanently delete every video from the dashcam? This cannot be undone." disabled>
|
||||
<i class="fas fa-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="collapse" id="dashcam-files-body">
|
||||
<div class="card-body p-0">
|
||||
{{ data_table(
|
||||
"dashcam-file-list",
|
||||
[
|
||||
{"key": "selected", "label": "", "sortable": false},
|
||||
{"key": "path", "label": "File", "sortable": true},
|
||||
{"key": "size", "label": "Size", "sortable": true},
|
||||
{"key": "modified", "label": "Modified", "sortable": true},
|
||||
{"key": "actions", "label": "", "sortable": false}
|
||||
],
|
||||
"No videos found",
|
||||
"Connect the dashcam in USB storage mode, then refresh this list."
|
||||
) }}
|
||||
</div>
|
||||
<div class="card-footer py-2 d-flex align-items-center gap-2">
|
||||
<i class="fas fa-info-circle text-muted small"></i>
|
||||
<span id="dash-import-status" class="small text-muted">No import has been run yet.</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{# ── Imported videos on Pi ───────────────────────────────────────────── #}
|
||||
<div class="card shadow-sm mb-3">
|
||||
<div class="card-header py-2 d-flex flex-wrap align-items-center gap-2">
|
||||
<button class="btn btn-link text-primary fw-bold p-0 text-decoration-none d-flex align-items-center gap-1"
|
||||
type="button" data-bs-toggle="collapse" data-bs-target="#local-videos-body"
|
||||
aria-expanded="true" aria-controls="local-videos-body" id="local-videos-toggle">
|
||||
<i class="fas fa-chevron-down toggle-icon" style="font-size:.7rem;transition:transform .2s;"></i>
|
||||
Videos on Pi
|
||||
</button>
|
||||
<small id="local-video-summary" class="text-muted ms-1">Loading…</small>
|
||||
<button id="local-videos-refresh-btn" class="btn btn-sm btn-outline-secondary ms-auto" type="button">
|
||||
<i class="fas fa-sync-alt"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div class="collapse show" id="local-videos-body">
|
||||
<div class="card-body p-0">
|
||||
{{ data_table(
|
||||
"local-video-list",
|
||||
[
|
||||
{"key": "thumbnail", "label": "", "sortable": false},
|
||||
{"key": "path", "label": "File", "sortable": true},
|
||||
{"key": "size", "label": "Size", "sortable": true},
|
||||
{"key": "modified", "label": "Date", "sortable": true},
|
||||
{"key": "uploaded", "label": "Upload", "sortable": true},
|
||||
{"key": "actions", "label": "", "sortable": false}
|
||||
],
|
||||
"No imported videos",
|
||||
"Import videos from the connected dashcam to browse and play them here."
|
||||
) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{# ── Video player (hidden until opened) ─────────────────────────────── #}
|
||||
<div id="local-video-player-panel" class="card shadow-sm mb-3" hidden>
|
||||
<div class="card-header py-2 d-flex align-items-center justify-content-between">
|
||||
<p id="local-video-player-title" class="text-primary m-0 fw-bold small"></p>
|
||||
<button id="local-video-player-close" class="btn btn-sm btn-outline-secondary" type="button">
|
||||
<i class="fas fa-times me-1"></i>Close
|
||||
</button>
|
||||
</div>
|
||||
<div class="card-body p-0">
|
||||
<video id="local-video-player" class="local-video-player" controls preload="metadata"></video>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
<script src="{{ url_for('static', filename='js/dash.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/local-videos.js') }}"></script>
|
||||
<script>
|
||||
// Rotate chevron icons on collapse toggle
|
||||
document.querySelectorAll('[data-bs-toggle="collapse"]').forEach(function (btn) {
|
||||
const target = document.querySelector(btn.getAttribute('data-bs-target'));
|
||||
if (!target) return;
|
||||
const icon = btn.querySelector('.toggle-icon');
|
||||
if (!icon) return;
|
||||
target.addEventListener('show.bs.collapse', function () { icon.style.transform = 'rotate(90deg)'; });
|
||||
target.addEventListener('hide.bs.collapse', function () { icon.style.transform = 'rotate(0deg)'; });
|
||||
// Init state
|
||||
if (target.classList.contains('show')) icon.style.transform = 'rotate(90deg)';
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
+20
-20
@@ -8,32 +8,29 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="d-sm-flex justify-content-between align-items-center mb-4">
|
||||
<div>
|
||||
<h3 class="text-dark mb-1">Trip history</h3>
|
||||
<p class="text-muted mb-0">Review recorded drives and replay their routes offline.</p>
|
||||
</div>
|
||||
</div>
|
||||
<h3 class="text-dark mb-3 fw-bold">Trip history</h3>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xl-5 mb-4">
|
||||
<div class="card shadow h-100">
|
||||
<div class="card-header py-3">
|
||||
{# Mobile: list on top, map below. Desktop: side by side. #}
|
||||
<div class="row g-3">
|
||||
{# ── Trip list ──────────────────────────────────────────────────── #}
|
||||
<div class="col-12 col-xl-5">
|
||||
<div class="card shadow-sm">
|
||||
<div class="card-header py-2">
|
||||
<h6 class="text-primary fw-bold m-0">Recorded trips</h6>
|
||||
</div>
|
||||
<div class="card-body p-0">
|
||||
<div id="trip-loading" class="text-center text-muted p-5">
|
||||
<div id="trip-loading" class="text-center text-muted py-4">
|
||||
<span class="spinner-border spinner-border-sm me-2" aria-hidden="true"></span>
|
||||
Loading trips...
|
||||
Loading…
|
||||
</div>
|
||||
<div id="trip-error" class="alert alert-danger m-3" role="alert" hidden></div>
|
||||
{{ data_table(
|
||||
"trip-list",
|
||||
[
|
||||
{"key": "started", "label": "Started", "sortable": true},
|
||||
{"key": "distance", "label": "Distance", "sortable": true},
|
||||
{"key": "duration", "label": "Duration", "sortable": true},
|
||||
{"key": "maxSpeed", "label": "Max speed", "sortable": true},
|
||||
{"key": "distance", "label": "km", "sortable": true},
|
||||
{"key": "duration", "label": "Time", "sortable": true},
|
||||
{"key": "maxSpeed", "label": "Max", "sortable": true},
|
||||
{"key": "action", "label": "", "sortable": false}
|
||||
],
|
||||
"No trips detected",
|
||||
@@ -42,9 +39,11 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xl-7 mb-4">
|
||||
<div class="card shadow">
|
||||
<div class="card-header py-3 d-flex justify-content-between align-items-center">
|
||||
|
||||
{# ── Route replay map ───────────────────────────────────────────── #}
|
||||
<div class="col-12 col-xl-7">
|
||||
<div class="card shadow-sm">
|
||||
<div class="card-header py-2 d-flex justify-content-between align-items-center">
|
||||
<h6 class="text-primary fw-bold m-0">Route replay</h6>
|
||||
<span id="trip-summary" class="small text-muted">Select a trip</span>
|
||||
</div>
|
||||
@@ -52,10 +51,11 @@
|
||||
<div id="history-map" aria-label="Selected trip route map"></div>
|
||||
<div id="trip-timeline" class="border-top p-3" hidden>
|
||||
<div class="d-flex align-items-center gap-3">
|
||||
<button id="trip-play" class="btn btn-primary btn-sm" type="button" aria-label="Play trip replay">
|
||||
<button id="trip-play" class="btn btn-primary btn-sm" type="button" aria-label="Play">
|
||||
<i class="fas fa-play" aria-hidden="true"></i>
|
||||
</button>
|
||||
<input id="trip-scrubber" class="form-range flex-grow-1" type="range" min="0" max="0" value="0" aria-label="Trip replay timeline">
|
||||
<input id="trip-scrubber" class="form-range flex-grow-1" type="range"
|
||||
min="0" max="0" value="0" aria-label="Trip replay timeline">
|
||||
</div>
|
||||
<div class="d-flex flex-wrap justify-content-between gap-2 small mt-2">
|
||||
<strong id="trip-replay-time"></strong>
|
||||
|
||||
+78
-61
@@ -7,54 +7,54 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h3 class="text-dark mb-4 fw-bold">Dashboard</h3>
|
||||
<h3 class="text-dark mb-3 fw-bold">Dashboard</h3>
|
||||
|
||||
{# ── OBD stat cards ──────────────────────────────────────────────────── #}
|
||||
<div class="row g-3 mb-4">
|
||||
<div class="col-6 col-lg-4 col-xl-2">
|
||||
<div class="row g-2 mb-3">
|
||||
<div class="col-6 col-sm-4 col-xl-2">
|
||||
<div class="card shadow-sm border-start-primary h-100">
|
||||
<div class="card-body py-3">
|
||||
<div class="text-uppercase text-primary fw-bold text-xs mb-1">OBD Status</div>
|
||||
<div id="obd-status" class="fw-bold h5 mb-0 text-dark">—</div>
|
||||
<div class="card-body py-2 px-3">
|
||||
<div class="text-uppercase text-primary fw-bold text-xs mb-1">OBD</div>
|
||||
<div id="obd-status" class="fw-bold mb-0 text-dark obd-val">—</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 col-lg-4 col-xl-2">
|
||||
<div class="col-6 col-sm-4 col-xl-2">
|
||||
<div class="card shadow-sm border-start-success h-100">
|
||||
<div class="card-body py-3">
|
||||
<div class="card-body py-2 px-3">
|
||||
<div class="text-uppercase text-success fw-bold text-xs mb-1">Speed</div>
|
||||
<div id="obd-speed" class="fw-bold h5 mb-0 text-dark">—</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 col-lg-4 col-xl-2">
|
||||
<div class="col-6 col-sm-4 col-xl-2">
|
||||
<div class="card shadow-sm border-start-info h-100">
|
||||
<div class="card-body py-3">
|
||||
<div class="card-body py-2 px-3">
|
||||
<div class="text-uppercase text-info fw-bold text-xs mb-1">RPM</div>
|
||||
<div id="obd-rpm" class="fw-bold h5 mb-0 text-dark">—</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 col-lg-4 col-xl-2">
|
||||
<div class="col-6 col-sm-4 col-xl-2">
|
||||
<div class="card shadow-sm border-start-warning h-100">
|
||||
<div class="card-body py-3">
|
||||
<div class="text-uppercase text-warning fw-bold text-xs mb-1">Coolant temp</div>
|
||||
<div class="card-body py-2 px-3">
|
||||
<div class="text-uppercase text-warning fw-bold text-xs mb-1">Coolant</div>
|
||||
<div id="obd-coolant" class="fw-bold h5 mb-0 text-dark">—</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 col-lg-4 col-xl-2">
|
||||
<div class="col-6 col-sm-4 col-xl-2">
|
||||
<div class="card shadow-sm border-start-danger h-100">
|
||||
<div class="card-body py-3">
|
||||
<div class="card-body py-2 px-3">
|
||||
<div class="text-uppercase text-danger fw-bold text-xs mb-1">Throttle</div>
|
||||
<div id="obd-throttle" class="fw-bold h5 mb-0 text-dark">—</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-6 col-lg-4 col-xl-2">
|
||||
<div class="col-6 col-sm-4 col-xl-2">
|
||||
<div class="card shadow-sm border-start-primary h-100">
|
||||
<div class="card-body py-3">
|
||||
<div class="text-uppercase text-primary fw-bold text-xs mb-1">Fuel level</div>
|
||||
<div class="card-body py-2 px-3">
|
||||
<div class="text-uppercase text-primary fw-bold text-xs mb-1">Fuel</div>
|
||||
<div id="obd-fuel" class="fw-bold h5 mb-0 text-dark">—</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -62,71 +62,70 @@
|
||||
</div>
|
||||
|
||||
{# ── Pi health ───────────────────────────────────────────────────────── #}
|
||||
<div class="card shadow-sm mb-4" id="pi-health-card">
|
||||
<div class="card-header d-flex flex-wrap justify-content-between align-items-center gap-2">
|
||||
<div class="card shadow-sm mb-3" id="pi-health-card">
|
||||
<div class="card-header d-flex flex-wrap justify-content-between align-items-center gap-2 py-2">
|
||||
<h6 class="text-primary fw-bold m-0">Pi health</h6>
|
||||
<span id="pi-health-updated" class="small text-muted">Loading…</span>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div id="pi-health-warning" class="alert alert-warning" role="alert" hidden></div>
|
||||
<div id="pi-health-error" class="alert alert-danger" role="alert" hidden></div>
|
||||
<div class="row g-3">
|
||||
<div class="card-body py-2">
|
||||
<div id="pi-health-warning" class="alert alert-warning py-2 mb-2" role="alert" hidden></div>
|
||||
<div id="pi-health-error" class="alert alert-danger py-2 mb-2" role="alert" hidden></div>
|
||||
<div class="row g-2">
|
||||
<div class="col-6 col-lg-3">
|
||||
<div class="text-uppercase text-muted fw-bold text-xs mb-1">CPU temperature</div>
|
||||
<div id="pi-temperature" class="h5 text-dark fw-bold mb-0">--</div>
|
||||
<div class="text-uppercase text-muted fw-bold text-xs mb-1">CPU temp</div>
|
||||
<div id="pi-temperature" class="h6 text-dark fw-bold mb-0">--</div>
|
||||
</div>
|
||||
<div class="col-6 col-lg-3">
|
||||
<div class="text-uppercase text-muted fw-bold text-xs mb-1">Memory used</div>
|
||||
<div id="pi-memory" class="h5 text-dark fw-bold mb-0">--</div>
|
||||
<div class="text-uppercase text-muted fw-bold text-xs mb-1">Memory</div>
|
||||
<div id="pi-memory" class="h6 text-dark fw-bold mb-0">--</div>
|
||||
</div>
|
||||
<div class="col-6 col-lg-3">
|
||||
<div class="text-uppercase text-muted fw-bold text-xs mb-1">Disk used</div>
|
||||
<div id="pi-disk" class="h5 text-dark fw-bold mb-0">--</div>
|
||||
<div class="text-uppercase text-muted fw-bold text-xs mb-1">Disk</div>
|
||||
<div id="pi-disk" class="h6 text-dark fw-bold mb-0">--</div>
|
||||
</div>
|
||||
<div class="col-6 col-lg-3">
|
||||
<div class="text-uppercase text-muted fw-bold text-xs mb-1">Uptime</div>
|
||||
<div id="pi-uptime" class="h5 text-dark fw-bold mb-0">--</div>
|
||||
<div id="pi-uptime" class="h6 text-dark fw-bold mb-0">--</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{# ── Speed graph + GPS ───────────────────────────────────────────────── #}
|
||||
<div class="row g-3">
|
||||
<div class="col-lg-7 col-xl-8">
|
||||
<div class="card shadow-sm mb-4">
|
||||
<div class="card-header">
|
||||
<h6 class="text-primary fw-bold m-0">Speed Graph</h6>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="chart-container" style="position:relative;height:40vh;text-align:center;">
|
||||
<canvas id="speedGraph"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{# ── GPS map (with inline coords footer) ─────────────────────────────── #}
|
||||
<div class="row g-3 mb-3">
|
||||
<div class="col-lg-5 col-xl-4">
|
||||
<div class="card shadow-sm mb-3">
|
||||
<div class="card-header">
|
||||
<h6 class="text-primary fw-bold m-0">GPS</h6>
|
||||
<div class="card shadow-sm h-100">
|
||||
<div class="card-header py-2">
|
||||
<h6 class="text-primary fw-bold m-0">Live GPS</h6>
|
||||
</div>
|
||||
<div class="card-body p-0">
|
||||
<div id="map"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card shadow-sm mb-4">
|
||||
<div class="card-header">
|
||||
<h6 class="text-primary fw-bold m-0">GPS coordinates</h6>
|
||||
<div class="card-footer py-2 d-flex gap-4 bg-white border-top">
|
||||
<div>
|
||||
<div class="text-xs text-muted fw-bold text-uppercase">Lat</div>
|
||||
<div id="gpsLocationX" class="fw-semibold small">—</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="text-xs text-muted fw-bold text-uppercase">Lon</div>
|
||||
<div id="gpsLocationY" class="fw-semibold small">—</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body py-2">
|
||||
<div class="d-flex gap-4">
|
||||
<div>
|
||||
<div class="text-xs text-muted fw-bold text-uppercase mb-1">Latitude</div>
|
||||
<div id="gpsLocationX" class="fw-bold">—</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="text-xs text-muted fw-bold text-uppercase mb-1">Longitude</div>
|
||||
<div id="gpsLocationY" class="fw-bold">—</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-7 col-xl-8">
|
||||
<div class="card shadow-sm h-100">
|
||||
<div class="card-header py-2 d-flex align-items-center justify-content-between">
|
||||
<h6 class="text-primary fw-bold m-0">Speed history</h6>
|
||||
<button class="btn btn-link btn-sm p-0 text-muted" id="speed-graph-toggle" type="button"
|
||||
aria-expanded="false" aria-controls="speed-graph-body">
|
||||
<i class="fas fa-chevron-down"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div class="collapse" id="speed-graph-body">
|
||||
<div class="card-body">
|
||||
<div class="chart-container" style="position:relative;height:14rem;">
|
||||
<canvas id="speedGraph"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -140,4 +139,22 @@
|
||||
<script src="{{ url_for('static', filename='vendor/socketio/socket.io.min.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='vendor/leaflet/leaflet.js') }}"></script>
|
||||
<script src="{{ url_for('static', filename='js/yaris.js') }}"></script>
|
||||
<script>
|
||||
// Speed graph toggle
|
||||
(function () {
|
||||
const btn = document.getElementById('speed-graph-toggle');
|
||||
const body = document.getElementById('speed-graph-body');
|
||||
if (!btn || !body) return;
|
||||
const bsCollapse = new bootstrap.Collapse(body, {toggle: false});
|
||||
body.addEventListener('show.bs.collapse', function () {
|
||||
btn.setAttribute('aria-expanded', 'true');
|
||||
btn.querySelector('i').className = 'fas fa-chevron-up';
|
||||
});
|
||||
body.addEventListener('hide.bs.collapse', function () {
|
||||
btn.setAttribute('aria-expanded', 'false');
|
||||
btn.querySelector('i').className = 'fas fa-chevron-down';
|
||||
});
|
||||
btn.addEventListener('click', function () { bsCollapse.toggle(); });
|
||||
})();
|
||||
</script>
|
||||
{% endblock %}
|
||||
+165
-119
@@ -3,166 +3,212 @@
|
||||
{% block title %}Settings - Yaris OBD{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="d-flex flex-wrap align-items-center justify-content-between gap-2 mb-4">
|
||||
<div class="d-flex flex-wrap align-items-center justify-content-between gap-2 mb-3">
|
||||
<div>
|
||||
<h3 class="text-dark mb-1">Settings</h3>
|
||||
<p class="text-muted mb-0">Configuration stored locally on this Pi.</p>
|
||||
<h3 class="text-dark mb-0 fw-bold">Settings</h3>
|
||||
<p class="text-muted small mb-0">Stored locally on this Pi.</p>
|
||||
</div>
|
||||
<button class="btn btn-primary d-none d-md-inline-block settings-save" type="submit" form="settings-form" disabled>
|
||||
<i class="fas fa-save me-1"></i>Save settings
|
||||
<button class="btn btn-primary btn-sm d-none d-md-inline-flex align-items-center gap-1 settings-save"
|
||||
type="submit" form="settings-form" disabled>
|
||||
<i class="fas fa-save"></i> Save settings
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div id="settings-message" class="alert" role="status" hidden></div>
|
||||
|
||||
<form id="settings-form">
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<p class="text-primary m-0 fw-bold">Uploads and local video</p>
|
||||
|
||||
{# ── Upload & retention ──────────────────────────────────────────── #}
|
||||
<div class="card shadow-sm mb-3">
|
||||
<div class="card-header py-2">
|
||||
<p class="text-primary m-0 fw-bold small">Uploads & local video</p>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-check form-switch mb-3">
|
||||
<div class="card-body py-3">
|
||||
<div class="form-check form-switch mb-2">
|
||||
<input class="form-check-input" type="checkbox" role="switch" id="dashcam-upload-enabled">
|
||||
<label class="form-check-label" for="dashcam-upload-enabled">Upload dashcam videos to the remote server</label>
|
||||
<label class="form-check-label" for="dashcam-upload-enabled">Upload dashcam videos to server</label>
|
||||
</div>
|
||||
<p class="text-muted small">Trip/GPS uploads remain enabled. Dashcam video only uploads over WiFi/Ethernet.</p>
|
||||
<p id="upload-health" class="small mb-3">Checking remote upload status...</p>
|
||||
<label class="form-label" for="retention-days">Delete uploaded local videos after</label>
|
||||
<div class="input-group settings-number">
|
||||
<input class="form-control" id="retention-days" type="number" min="0" max="3650" step="1" required>
|
||||
<span class="input-group-text">days</span>
|
||||
<p class="text-muted small mb-2">Trip/GPS always uploads. Dashcam video only over WiFi/Ethernet.</p>
|
||||
<p id="upload-health" class="small text-muted mb-3">Checking…</p>
|
||||
<div class="d-flex align-items-center gap-2">
|
||||
<label class="form-label mb-0 text-nowrap" for="retention-days">Delete after</label>
|
||||
<div class="input-group input-group-sm" style="max-width:10rem;">
|
||||
<input class="form-control" id="retention-days" type="number" min="0" max="3650" step="1" required>
|
||||
<span class="input-group-text">days</span>
|
||||
</div>
|
||||
<span class="small text-muted">(0 = keep forever)</span>
|
||||
</div>
|
||||
<div class="form-text">Use 0 to keep uploaded local copies until manually deleted.</div>
|
||||
<div class="invalid-feedback" data-error-for="local_video_retention_days"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<p class="text-primary m-0 fw-bold">Phone hotspot internet</p>
|
||||
{# ── Phone hotspot ───────────────────────────────────────────────── #}
|
||||
<div class="card shadow-sm mb-3">
|
||||
<div class="card-header py-2">
|
||||
<p class="text-primary m-0 fw-bold small">Phone hotspot internet</p>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<p id="uplink-status" class="mb-3">Checking network mode...</p>
|
||||
<div class="card-body py-3">
|
||||
<p id="uplink-status" class="mb-2 small fw-semibold">Checking network mode…</p>
|
||||
<p id="last-phone-address" class="small mb-3" hidden>
|
||||
Last phone-network address:
|
||||
<a id="last-phone-address-link" href="#"></a>
|
||||
<span class="text-muted">(DHCP may change it after reconnecting.)</span>
|
||||
Last phone IP: <a id="last-phone-address-link" href="#"></a>
|
||||
<span class="text-muted">(may change after reconnecting)</span>
|
||||
</p>
|
||||
<div class="row g-3">
|
||||
<div class="col-md-6">
|
||||
<label class="form-label" for="phone-hotspot-ssid">Phone hotspot name</label>
|
||||
<input class="form-control" id="phone-hotspot-ssid" maxlength="32" autocomplete="off">
|
||||
<div class="row g-2 mb-3">
|
||||
<div class="col-sm-6">
|
||||
<label class="form-label form-label-sm" for="phone-hotspot-ssid">Hotspot name</label>
|
||||
<input class="form-control form-control-sm" id="phone-hotspot-ssid" maxlength="32" autocomplete="off">
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="form-label" for="phone-hotspot-password">Phone hotspot password</label>
|
||||
<input class="form-control" id="phone-hotspot-password" type="password" minlength="8" maxlength="63" autocomplete="new-password">
|
||||
<div class="col-sm-6">
|
||||
<label class="form-label form-label-sm" for="phone-hotspot-password">Password</label>
|
||||
<input class="form-control form-control-sm" id="phone-hotspot-password" type="password"
|
||||
minlength="8" maxlength="63" autocomplete="new-password">
|
||||
</div>
|
||||
</div>
|
||||
<div id="uplink-message" class="alert mt-3 mb-0" role="status" hidden></div>
|
||||
<div class="d-flex flex-wrap gap-2 mt-3">
|
||||
<button class="btn btn-primary" id="phone-hotspot-save" type="button">Save hotspot</button>
|
||||
<button class="btn btn-outline-primary" id="phone-hotspot-connect" type="button" disabled>Wait for hotspot</button>
|
||||
<button class="btn btn-outline-danger" id="phone-hotspot-remove" type="button" disabled>Remove hotspot</button>
|
||||
<div id="uplink-message" class="alert py-2 mt-2 mb-0" role="status" hidden></div>
|
||||
<div class="d-flex flex-wrap gap-2 mb-2">
|
||||
<button class="btn btn-sm btn-primary" id="phone-hotspot-save" type="button">Save</button>
|
||||
<button class="btn btn-sm btn-outline-primary" id="phone-hotspot-connect" type="button" disabled>Wait for hotspot</button>
|
||||
<button class="btn btn-sm btn-outline-danger" id="phone-hotspot-remove" type="button" disabled>Remove</button>
|
||||
</div>
|
||||
<p class="form-text mb-0 mt-3">
|
||||
Save while the phone is still connected to the Pi/home WiFi. Then select
|
||||
<strong>Wait for hotspot</strong> and enable the phone hotspot within two minutes.
|
||||
The password is write-only and is never returned here. This page may briefly close
|
||||
while networks switch. Some phones do not resolve <strong>yaris.local</strong> for
|
||||
tethered clients; use the last direct address shown above when needed. If the phone
|
||||
hotspot never appears, the Pi restores home WiFi or its local hotspot.
|
||||
<p class="form-text small mb-0">
|
||||
Save while connected to home WiFi, then tap <strong>Wait for hotspot</strong> and enable the phone hotspot within 2 min.
|
||||
Password is write-only. If the Pi hotspot doesn't appear via <strong>yaris.local</strong>, use the last phone IP above.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<p class="text-primary m-0 fw-bold">Cellular trip-log fallback</p>
|
||||
{# ── Cellular + ntfy (collapsible together) ─────────────────────── #}
|
||||
<div class="card shadow-sm mb-3">
|
||||
<div class="card-header py-2 d-flex align-items-center justify-content-between"
|
||||
style="cursor:pointer;" data-bs-toggle="collapse" data-bs-target="#connectivity-body"
|
||||
aria-expanded="false" aria-controls="connectivity-body">
|
||||
<p class="text-primary m-0 fw-bold small">Cellular & notifications</p>
|
||||
<i class="fas fa-chevron-down text-muted small collapse-chevron"></i>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-check form-switch mb-3">
|
||||
<input class="form-check-input" type="checkbox" role="switch" id="cellular-enabled">
|
||||
<label class="form-check-label" for="cellular-enabled">Enable SIM868 cellular fallback</label>
|
||||
</div>
|
||||
<label class="form-label" for="cellular-apn">Carrier APN</label>
|
||||
<input class="form-control" id="cellular-apn" maxlength="100" autocomplete="off" placeholder="example.apn">
|
||||
<div class="invalid-feedback" data-error-for="cellular_apn"></div>
|
||||
<div class="form-text">Used only for small trip-log batches when WiFi/Ethernet is unavailable. Dashcam video never uses cellular.</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<p class="text-primary m-0 fw-bold">Optional ntfy notifications</p>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-check form-switch mb-3">
|
||||
<input class="form-check-input" type="checkbox" role="switch" id="ntfy-enabled">
|
||||
<label class="form-check-label" for="ntfy-enabled">Send alerts through ntfy</label>
|
||||
</div>
|
||||
<label class="form-label" for="ntfy-url">ntfy topic URL</label>
|
||||
<input class="form-control" id="ntfy-url" type="url" maxlength="2048" autocomplete="off" placeholder="https://ntfy.sh/private-topic">
|
||||
<div class="invalid-feedback" data-error-for="ntfy_url"></div>
|
||||
<div class="form-text" id="ntfy-url-state">Leave blank to keep the saved URL unchanged.</div>
|
||||
<div class="form-check mt-2">
|
||||
<input class="form-check-input" type="checkbox" id="clear-ntfy-url">
|
||||
<label class="form-check-label" for="clear-ntfy-url">Remove saved ntfy URL</label>
|
||||
</div>
|
||||
<label class="form-label mt-3" for="ntfy-token">Access token</label>
|
||||
<input class="form-control" id="ntfy-token" type="password" maxlength="512" autocomplete="new-password" placeholder="Optional">
|
||||
<div class="invalid-feedback" data-error-for="ntfy_token"></div>
|
||||
<div class="form-text" id="ntfy-token-state">Leave blank to keep the saved token unchanged.</div>
|
||||
<div class="form-check mt-2">
|
||||
<input class="form-check-input" type="checkbox" id="clear-ntfy-token">
|
||||
<label class="form-check-label" for="clear-ntfy-token">Remove saved ntfy token</label>
|
||||
<div class="collapse" id="connectivity-body">
|
||||
<div class="card-body py-3">
|
||||
{# Cellular #}
|
||||
<p class="fw-semibold small text-secondary text-uppercase mb-2">SIM868 Cellular</p>
|
||||
<div class="form-check form-switch mb-2">
|
||||
<input class="form-check-input" type="checkbox" role="switch" id="cellular-enabled">
|
||||
<label class="form-check-label" for="cellular-enabled">Enable SIM868 cellular fallback</label>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<label class="form-label form-label-sm" for="cellular-apn">Carrier APN</label>
|
||||
<input class="form-control form-control-sm" id="cellular-apn" maxlength="100"
|
||||
autocomplete="off" placeholder="example.apn">
|
||||
<div class="invalid-feedback" data-error-for="cellular_apn"></div>
|
||||
<div class="form-text">Small trip-log batches only. Dashcam video never uses cellular.</div>
|
||||
</div>
|
||||
<hr class="my-3">
|
||||
{# ntfy #}
|
||||
<p class="fw-semibold small text-secondary text-uppercase mb-2">ntfy push notifications</p>
|
||||
<div class="form-check form-switch mb-2">
|
||||
<input class="form-check-input" type="checkbox" role="switch" id="ntfy-enabled">
|
||||
<label class="form-check-label" for="ntfy-enabled">Send alerts via ntfy</label>
|
||||
</div>
|
||||
<div class="mb-2">
|
||||
<label class="form-label form-label-sm" for="ntfy-url">Topic URL</label>
|
||||
<input class="form-control form-control-sm" id="ntfy-url" type="url" maxlength="2048"
|
||||
autocomplete="off" placeholder="https://ntfy.sh/my-topic">
|
||||
<div class="invalid-feedback" data-error-for="ntfy_url"></div>
|
||||
<div class="form-text" id="ntfy-url-state">Leave blank to keep saved URL.</div>
|
||||
<div class="form-check mt-1">
|
||||
<input class="form-check-input" type="checkbox" id="clear-ntfy-url">
|
||||
<label class="form-check-label small" for="clear-ntfy-url">Remove saved URL</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mb-0">
|
||||
<label class="form-label form-label-sm" for="ntfy-token">Access token</label>
|
||||
<input class="form-control form-control-sm" id="ntfy-token" type="password"
|
||||
maxlength="512" autocomplete="new-password" placeholder="Optional">
|
||||
<div class="invalid-feedback" data-error-for="ntfy_token"></div>
|
||||
<div class="form-text" id="ntfy-token-state">Leave blank to keep saved token.</div>
|
||||
<div class="form-check mt-1">
|
||||
<input class="form-check-input" type="checkbox" id="clear-ntfy-token">
|
||||
<label class="form-check-label small" for="clear-ntfy-token">Remove saved token</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card shadow mb-4">
|
||||
<div class="card-header py-3">
|
||||
<p class="text-primary m-0 fw-bold">Alert thresholds and repeat interval</p>
|
||||
{# ── Alert thresholds (collapsible) ──────────────────────────────── #}
|
||||
<div class="card shadow-sm mb-3">
|
||||
<div class="card-header py-2 d-flex align-items-center justify-content-between"
|
||||
style="cursor:pointer;" data-bs-toggle="collapse" data-bs-target="#thresholds-body"
|
||||
aria-expanded="false" aria-controls="thresholds-body">
|
||||
<p class="text-primary m-0 fw-bold small">Alert thresholds</p>
|
||||
<i class="fas fa-chevron-down text-muted small collapse-chevron"></i>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row g-3">
|
||||
<div class="col-md-6">
|
||||
<label class="form-label" for="temperature-c">Pi temperature</label>
|
||||
<div class="input-group"><input class="form-control" id="temperature-c" type="number" min="40" max="100" step="0.1" required><span class="input-group-text">°C</span></div>
|
||||
<div class="invalid-feedback" data-error-for="temperature_c"></div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="form-label" for="disk-percent">Pi/dashcam disk usage</label>
|
||||
<div class="input-group"><input class="form-control" id="disk-percent" type="number" min="50" max="100" step="0.1" required><span class="input-group-text">%</span></div>
|
||||
<div class="invalid-feedback" data-error-for="disk_percent"></div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="form-label" for="tracking-backlog">Pending tracking rows</label>
|
||||
<input class="form-control" id="tracking-backlog" type="number" min="1" max="1000000" step="1" required>
|
||||
<div class="invalid-feedback" data-error-for="tracking_backlog"></div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="form-label" for="video-backlog">Pending videos</label>
|
||||
<input class="form-control" id="video-backlog" type="number" min="1" max="100000" step="1" required>
|
||||
<div class="invalid-feedback" data-error-for="video_backlog"></div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="form-label" for="gps-loss-seconds">GPS loss while moving</label>
|
||||
<div class="input-group"><input class="form-control" id="gps-loss-seconds" type="number" min="10" max="3600" step="1" required><span class="input-group-text">seconds</span></div>
|
||||
<div class="invalid-feedback" data-error-for="gps_loss_seconds"></div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label class="form-label" for="repeat-seconds">Repeat active notifications</label>
|
||||
<div class="input-group"><input class="form-control" id="repeat-seconds" type="number" min="60" max="604800" step="1" required><span class="input-group-text">seconds</span></div>
|
||||
<div class="invalid-feedback" data-error-for="repeat_seconds"></div>
|
||||
<div class="collapse" id="thresholds-body">
|
||||
<div class="card-body py-3">
|
||||
<div class="row g-3">
|
||||
<div class="col-6">
|
||||
<label class="form-label form-label-sm" for="temperature-c">Pi temp</label>
|
||||
<div class="input-group input-group-sm">
|
||||
<input class="form-control" id="temperature-c" type="number" min="40" max="100" step="0.1" required>
|
||||
<span class="input-group-text">°C</span>
|
||||
</div>
|
||||
<div class="invalid-feedback" data-error-for="temperature_c"></div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<label class="form-label form-label-sm" for="disk-percent">Disk usage</label>
|
||||
<div class="input-group input-group-sm">
|
||||
<input class="form-control" id="disk-percent" type="number" min="50" max="100" step="0.1" required>
|
||||
<span class="input-group-text">%</span>
|
||||
</div>
|
||||
<div class="invalid-feedback" data-error-for="disk_percent"></div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<label class="form-label form-label-sm" for="tracking-backlog">Tracking backlog</label>
|
||||
<input class="form-control form-control-sm" id="tracking-backlog" type="number" min="1" max="1000000" step="1" required>
|
||||
<div class="invalid-feedback" data-error-for="tracking_backlog"></div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<label class="form-label form-label-sm" for="video-backlog">Video backlog</label>
|
||||
<input class="form-control form-control-sm" id="video-backlog" type="number" min="1" max="100000" step="1" required>
|
||||
<div class="invalid-feedback" data-error-for="video_backlog"></div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<label class="form-label form-label-sm" for="gps-loss-seconds">GPS loss</label>
|
||||
<div class="input-group input-group-sm">
|
||||
<input class="form-control" id="gps-loss-seconds" type="number" min="10" max="3600" step="1" required>
|
||||
<span class="input-group-text">s</span>
|
||||
</div>
|
||||
<div class="invalid-feedback" data-error-for="gps_loss_seconds"></div>
|
||||
</div>
|
||||
<div class="col-6">
|
||||
<label class="form-label form-label-sm" for="repeat-seconds">Repeat interval</label>
|
||||
<div class="input-group input-group-sm">
|
||||
<input class="form-control" id="repeat-seconds" type="number" min="60" max="604800" step="1" required>
|
||||
<span class="input-group-text">s</span>
|
||||
</div>
|
||||
<div class="invalid-feedback" data-error-for="repeat_seconds"></div>
|
||||
</div>
|
||||
</div>
|
||||
<p class="text-muted small mt-3 mb-0">Web UI alerts are always shown regardless of ntfy.</p>
|
||||
</div>
|
||||
<p class="text-muted small mt-3 mb-0">Local Web UI alerts remain available even when ntfy is disabled.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button class="btn btn-primary w-100 d-md-none settings-save mb-4" type="submit" disabled>
|
||||
<i class="fas fa-save me-1"></i>Save settings
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
// Rotate chevrons on collapsible card headers
|
||||
document.querySelectorAll('[data-bs-toggle="collapse"]').forEach(function (trigger) {
|
||||
const targetId = trigger.getAttribute('data-bs-target');
|
||||
const target = document.querySelector(targetId);
|
||||
if (!target) return;
|
||||
const chevron = trigger.querySelector('.collapse-chevron');
|
||||
if (!chevron) return;
|
||||
target.addEventListener('show.bs.collapse', function () { chevron.style.transform = 'rotate(180deg)'; });
|
||||
target.addEventListener('hide.bs.collapse', function () { chevron.style.transform = ''; });
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
|
||||
Reference in New Issue
Block a user