From e795bdf6a5d1bd60188ed1d6374bd002634d7ec5 Mon Sep 17 00:00:00 2001 From: Brummel Date: Mon, 20 Apr 2026 10:51:01 +0200 Subject: [PATCH] feat: Display most recent recording time Add `recorded_at_iso` and `time_hms_utc` to `CasePageTemplate` to display the timestamp of the most recent recording. Introduce a new partial `partials/time_format.js` for consistent date and time formatting in the browser. Update templates to use the new partial for rendering timestamps and group headings. --- server/src/routes/user_web.rs | 12 +++++++ server/templates/case_page.html | 25 +++++++++++--- server/templates/my_cases.html | 43 +++++++++--------------- server/templates/partials/time_format.js | 27 +++++++++++++++ 4 files changed, 75 insertions(+), 32 deletions(-) create mode 100644 server/templates/partials/time_format.js diff --git a/server/src/routes/user_web.rs b/server/src/routes/user_web.rs index 9e72960..9b6cc3e 100644 --- a/server/src/routes/user_web.rs +++ b/server/src/routes/user_web.rs @@ -134,6 +134,12 @@ struct CasePageTemplate { case_id: String, case_id_short: String, oneliner: Option, + /// RFC3339 UTC timestamp of the most recent recording. `None` iff the + /// case has no recordings at all. Drives the datetime header under the + /// title; browser JS formats it to "Heute 11:34" / "13.12.2022 11:34". + recorded_at_iso: Option, + /// UTC `HH:MM` as a no-JS fallback inside the `