Add cellular-first ntfy delivery with WiFi fallback and safe SIM868 HTTP header framing. Co-authored-by: Copilot <[email protected]>
105 lines
6.5 KiB
HTML
105 lines
6.5 KiB
HTML
{% extends "base.html" %}
|
|
{% from "components.html" import data_table %}
|
|
|
|
{% 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>
|
|
{% endblock %}
|
|
|
|
{% block scripts %}
|
|
<script src="{{ url_for('static', filename='js/dash.js') }}"></script>
|
|
<script src="{{ url_for('static', filename='js/local-videos.js') }}"></script>
|
|
{% endblock %} |