88 lines
5.3 KiB
HTML
88 lines
5.3 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 class="card shadow">
|
|
<div class="card-header py-3">
|
|
<p class="text-primary m-0 fw-bold">Remote server upload</p>
|
|
</div>
|
|
<div class="card-body">
|
|
<p id="upload-status">Checking upload status...</p>
|
|
<div class="form-check form-switch">
|
|
<input class="form-check-input" type="checkbox" role="switch" id="dashcam-upload-toggle" disabled>
|
|
<label class="form-check-label" for="dashcam-upload-toggle">
|
|
Upload dashcam videos to remote server
|
|
</label>
|
|
</div>
|
|
<p class="text-muted small mt-2 mb-0">
|
|
Trip/GPS log uploads always stay on. Turning this off only pauses
|
|
the (larger) dashcam video uploads - useful on a slow or metered
|
|
connection. If configured, small trip-log batches can also fall
|
|
back to the SIM868's cellular data when WiFi/Ethernet is
|
|
unreachable - dashcam video never uses cellular.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block scripts %}
|
|
<script src="{{ url_for('static', filename='js/dash.js') }}"></script>
|
|
{% endblock %} |