diff --git a/static/yaris.css b/static/yaris.css index cfa41cd..34cb4af 100644 --- a/static/yaris.css +++ b/static/yaris.css @@ -211,11 +211,17 @@ body { /* ── Maps ────────────────────────────────────────────────────────────────── */ -#map { height: 20rem; } +#map { + height: 18rem; +} #history-map { - height: 36rem; - min-height: 24rem; + height: 32rem; + min-height: 20rem; +} + +@media (max-width: 767.98px) { + #history-map { height: 22rem; } } /* ── Alert dropdown ──────────────────────────────────────────────────────── */ @@ -286,6 +292,19 @@ body { opacity: .2; } +/* Shrink long values (e.g. "Disconnected") so they don't wrap */ +.obd-val { + font-size: 1rem; + line-height: 1.2; + word-break: break-word; +} + +/* ── Collapsible chevron ──────────────────────────────────────────────────── */ + +.collapse-chevron { + transition: transform .2s ease; +} + /* ── Misc ────────────────────────────────────────────────────────────────── */ .border-start-primary { border-left: .25rem solid var(--primary) !important; } diff --git a/templates/dash.html b/templates/dash.html index 51af7ee..0d0c116 100644 --- a/templates/dash.html +++ b/templates/dash.html @@ -4,102 +4,129 @@ {% block title %}Dashcam - Yaris OBD{% endblock %} {% block content %} -

Dashcam

-
-
-

Detected device

-
-
-

Checking for a USB dashcam...

- - -
-
-
-
-
-

Files on dashcam

- Scanning... -
-
- - - - -
-
-
- {{ 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." - ) }} -
-
-
-
-

Import results

-
-
-

No import has been run yet.

-
-
- -
-
-
-

Imported videos on Pi

- Loading... -
- -
-
- {{ 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." - ) }} -
-
+

Dashcam

+ +{# ── Device status bar ───────────────────────────────────────────────── #} +
+
+ + Checking for a USB dashcam… + + +
+
+ +{# ── Files on dashcam (collapsible) ─────────────────────────────────── #} +
+
+ + +
+ + + + +
+
+
+
+ {{ 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." + ) }} +
+ +
+
+ +{# ── Imported videos on Pi ───────────────────────────────────────────── #} +
+
+ + Loading… + +
+
+
+ {{ 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." + ) }} +
+
+
+ +{# ── Video player (hidden until opened) ─────────────────────────────── #} + {% endblock %} {% block scripts %} + {% endblock %} \ No newline at end of file diff --git a/templates/history.html b/templates/history.html index 552dd2b..0509de3 100644 --- a/templates/history.html +++ b/templates/history.html @@ -8,32 +8,29 @@ {% endblock %} {% block content %} -
-
-

Trip history

-

Review recorded drives and replay their routes offline.

-
-
+

Trip history

-
-
-
-
+{# Mobile: list on top, map below. Desktop: side by side. #} +
+ {# ── Trip list ──────────────────────────────────────────────────── #} +
+
+
Recorded trips
-
+
- Loading trips... + Loading…
{{ 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 @@
-
-
-
+ + {# ── Route replay map ───────────────────────────────────────────── #} +
+
+
Route replay
Select a trip
@@ -52,10 +51,11 @@