wger icon indicating copy to clipboard operation
wger copied to clipboard

Timer for Timed Exercises

Open tbouri opened this issue 1 month ago • 0 comments

Proposed Changes

  • Added unit_type field to RepetitionUnit model to distinguish TIME, REPETITIONS, and DISTANCE units
  • Created "Add Timed Exercise" form (Training > Add Timed Exercise) allowing users to add time-based exercises to routines
  • Implemented countdown timer that appears as a stopwatch button next to exercises with time units (Seconds/Minutes) on routine view pages
  • Timer modal includes circular progress display, start/pause/reset controls, and audio completion alert

How it works

  1. Navigate to Training > Add Timed Exercise
  2. Select a routine, exercise (e.g., Plank), duration, and unit (Seconds/Minutes)
  3. View the routine - a stopwatch icon appears next to the timed exercise
  4. Click the icon to open the countdown timer
  5. Use start/pause/reset controls; audio plays on completion

Related Issue(s)

See also #2008

User commands due to this PR

  • Users need to run database migrations
    • This applies the migration that adds the unit_type field to RepetitionUnit and sets existing units to their appropriate types (Seconds/Minutes → TIME, Miles/Km → DISTANCE, Reps/Till Failure → REPETITIONS).

tbouri avatar Dec 09 '25 12:12 tbouri