From 1da94931188c35c06dd032aadce2799fc13db1dd Mon Sep 17 00:00:00 2001 From: Martin Kagamino Lehoux Date: Tue, 11 Aug 2026 13:59:08 +0200 Subject: feat: Add Strava import progress --- web/templates.templ | 115 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 112 insertions(+), 3 deletions(-) (limited to 'web/templates.templ') diff --git a/web/templates.templ b/web/templates.templ index 85ee03d..74b0365 100644 --- a/web/templates.templ +++ b/web/templates.templ @@ -28,6 +28,9 @@ templ Layout(title string, content templ.Component) { label { display: grid; gap: .35rem; color: #5b675f; font-size: .85rem; font-weight: 650; } input { border: 1px solid #c8d0c9; border-radius: .55rem; padding: .65rem .7rem; font: inherit; color: inherit; background: #fff; } .form-row { display: flex; align-items: end; gap: .75rem; flex-wrap: wrap; } + .sync-progress { display: grid; gap: .7rem; margin-top: 1.25rem; } + .progress-heading { display: flex; justify-content: space-between; gap: 1rem; } + progress { width: 100%; height: .8rem; accent-color: #d96932; } .notice { margin: 1rem 0 0; border-radius: .6rem; padding: .75rem 1rem; background: #e5f3e9; color: #17633f; } .error { margin: 1rem 0 0; border-radius: .6rem; padding: .75rem 1rem; background: #fbe8df; color: #8c3517; } table { width: 100%; border-collapse: collapse; } @@ -147,23 +150,129 @@ templ SyncContent(data SyncPageData) {

Sync Strava rides

Choose a date range. New rides are downloaded as GPX files and recorded in the local library.

if data.Notice != "" { -
{ data.Notice }
+
{ data.Notice }
+ } else { + } if data.Error != "" { -
{ data.Error }
+
{ data.Error }
+ } else { + }
if !data.HasAuth {

Strava authorization is required before the first sync.

Authorize Strava } else { -
+
+ }
+ } -- cgit v1.2.3