From ed9516cbcb3c5254980a9e1dba7d8fa5ea230b35 Mon Sep 17 00:00:00 2001 From: Martin Kagamino Lehoux Date: Fri, 21 Aug 2026 19:30:50 +0200 Subject: Add distance filter to analytics and go fix to the check gate --- web/templates.templ | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'web/templates.templ') diff --git a/web/templates.templ b/web/templates.templ index 71df20b..f2b62f8 100644 --- a/web/templates.templ +++ b/web/templates.templ @@ -101,16 +101,37 @@ templ AnalyticsContent(data AnalyticsPageData) {

Analytics

Ride analytics

One point per ride: average speed on the x axis, Cotacol per 100 km on the y axis.

+
+
+
+

Refine

Analyses

+
Reset
+
+
+ @RideRangeFilter(rideDistanceFilterConfig(data.Filter)) +
+
+
-

Chart

Speed vs. Cotacol per 100 km

+
+

Chart

Speed vs. Cotacol per 100 km

+ if len(data.Points) > 0 { + { formatRideCount(len(data.Points)) } + } +
if len(data.Points) == 0 { -
No eligible rides yet. Import rides to see the chart.
+ if data.Filter.Active { +
No rides match the selected filters. Clear filters.
+ } else { +
No eligible rides yet. Import rides to see the chart.
+ } } else {
Hover a point to inspect a ride. }
@templ.JSONScript("analytics-points", data.Points) + } -- cgit v1.3