Commit Graph

508 Commits

Author SHA1 Message Date
Roland Geider
fb6a673503 Simplify code by adding new log provider
This makes the logic for copying or modifying the logs much easier. Also,
there were some user reports that the old logic sometimes behaved erratically
and old values were sometimes reverted.
2026-01-12 21:40:11 +01:00
Roland Geider
d187324a25 Properly handle null values
Basically all the fields can be nullable, so we need to set them if
we want to avoid LateInitialisation errors.
2025-12-18 10:58:40 +01:00
Roland Geider
077dcaf742 Handle HTML errors in WgerHttpException
These need to be handled separately when the server encounters an error and
returns HTML instead of JSON.
2025-12-17 18:59:45 +01:00
Roland Geider
06b32a2bd9 Better volume calculations, other cleanup 2025-12-04 12:14:57 +01:00
Roland Geider
ffc2f1a674 Allow some options for the user to control the timer between sets 2025-12-02 22:32:14 +01:00
Roland Geider
910e662243 Correctly show exercise overviews for supersets 2025-12-02 17:21:12 +01:00
Roland Geider
556713319c Correctly calculate the total number of pages 2025-12-02 16:55:25 +01:00
Roland Geider
5f61af3b66 Update generated files 2025-11-20 23:01:20 +01:00
Roland Geider
9f66815e10 Merge branch 'master' into feature/gym-mode
# Conflicts:
#	lib/widgets/routines/gym_mode/navigation.dart
#	pubspec.lock
#	test/exercises/contribute_exercise_image_test.mocks.dart
#	test/exercises/contribute_exercise_test.mocks.dart
#	test/nutrition/nutritional_meal_form_test.mocks.dart
#	test/nutrition/nutritional_plan_form_test.mocks.dart
2025-11-19 19:18:45 +01:00
lenka369
27c80ed550 prevent duplicate ingredients in cache 2025-11-18 23:34:12 +01:00
Roland Geider
3119429a02 Cleanup, tests, etc 2025-11-17 14:36:47 +01:00
Roland Geider
9bb417bd3f Don't recalculate the pages if it's not needed
This keeps the progression saved as well as any changed exercises
2025-11-16 15:48:15 +01:00
lenka369
aaa91a4591 Update mock files 2025-11-16 08:53:18 +01:00
Roland Geider
d094c407c9 Remove dependency of SlotData
Now, the LogPage gets all it's info from the state.
2025-11-16 00:34:46 +01:00
Roland Geider
c26e3828f8 Allow adding additional exercises to the workout
While these are not real ad-hoc workouts, at least it's a first step
2025-11-15 23:44:42 +01:00
Roland Geider
ec8578d43d Add some tests and fix a small bug in uuid handling 2025-11-15 15:59:24 +01:00
Roland Geider
f1f37d3e03 Allow swapping exercises in the gym mode 2025-11-15 01:32:59 +01:00
Roland Geider
317ae250f3 Remove the exercise ID, this is not used anymore 2025-11-14 23:45:16 +01:00
Roland Geider
742d8dac88 Properly render the current progression of the workout 2025-11-14 21:39:53 +01:00
Roland Geider
66b18b6b3c Further refactoring the gym mode 2025-11-14 14:41:25 +01:00
Roland Geider
e62e5d630a Show current workout in gym mode 2025-11-13 17:25:04 +01:00
Roland Geider
9ea6674849 Add test for calculatePages 2025-11-11 23:56:19 +01:00
Roland Geider
06cfa3a649 Move more logic to the gym mode provider
This makes the widgets in the gym mode smaller and we can remove
a lot of prop drilling that was necessary
2025-11-11 22:15:14 +01:00
Roland Geider
694615596f Allow the user to control the gym mode 2025-11-11 15:47:01 +01:00
Roland Geider
ae6db6ee07 Move to riverpod three
Needed to downgrade build_runner and mockito for now
2025-11-11 13:22:18 +01:00
lenka369
fc48c707e8 Added tests 2025-11-04 05:21:18 +01:00
lenka369
ed938cd3d2 Replaced print statements with logger 2025-11-03 10:03:37 +01:00
lenka369
a7ba623005 fix: Save ingredient to cache on selection 2025-10-31 10:36:34 +01:00
Roland Geider
93a11a16e4 Recreate generated files and reformat the repo
Seems the default dart formatting rules changed recently, and this was causing
huge diffs in branches
2025-10-09 17:39:02 +02:00
Roland Geider
4b9afa5c98 Actually send the correct image fields to the server 2025-10-08 14:34:23 +02:00
Roland Geider
c63057fe35 Reuse AddExerciseTextArea in the image form 2025-10-08 14:05:50 +02:00
Roland Geider
1a78011a7d Refactor image handling in the exercise submission process
Now the images are kept in a single list, instead of having two for
the files themselves and the metadata.
2025-10-08 12:45:37 +02:00
Roland Geider
136d0e0825 Extract some logic to their own widgets 2025-10-06 12:43:05 +02:00
Roland Geider
fa7f670e9f Some light cleanup 2025-10-06 12:31:12 +02:00
Branislav Nohaj
6f5777fbcb Simplify image upload and improve logging
Remove unnecessary response validation, replace print statements
with proper Logger module, and clean up debug output.
2025-10-04 16:13:22 +02:00
Branislav Nohaj
7bc8463406 dar format was performed 2025-10-04 11:13:10 +02:00
Branislav Nohaj
ed8e9ec744 Added option in mobile app to add more info about image 2025-10-04 10:22:01 +02:00
Roland Geider
a10b7eb9f7 Pass parameter to create new variation and link exercises 2025-09-28 15:03:28 +02:00
Roland Geider
960abc9bec Merge branch 'master' into feature/exercise-submission 2025-09-28 14:38:22 +02:00
Roland Geider
530efd366e Some renaming 2025-09-24 12:31:28 +02:00
Roland Geider
84c29eb209 Use the regular ingredient endpoint, instead of the special search one 2025-09-24 01:35:03 +02:00
Roland Geider
a7ee4ff5b3 Merge pull request #855 from wger-project/nutrition-plan-stats
Nutrition plan stats
2025-09-22 16:19:04 +02:00
Roland Geider
ba34570a3d Add image upload methods
We use the "manual" way as it was before, since there were some problems
making this work and most of the errors were happening during the exercise
creation itself.
2025-09-19 22:27:04 +02:00
Roland Geider
9ea8362d20 Show an overview with the new exercise data before saving
Also, correctly parse all validation errors that might be returned by the server
2025-09-19 16:59:18 +02:00
Roland Geider
711d7c0aba Update exercise submission model and related files
This now uses the combined endpoint, which creates the different objects
itself within a transaction, ensuring that no orphans can be created.
2025-09-18 21:57:27 +02:00
Roland Geider
798406eaa9 Make routineId nullable in session and related files
Sessions can be added ad-hoc, without needing to be part of any specific
routine.
2025-09-16 14:47:47 +02:00
Roland Geider
9b3957fe35 Use "clock" for mocking dates and datetimes
This should make the tests a bit more robust, specially in CI since these
tended to fail depending on how long and when the tests run. Also, rework
a bit the way the start and end dates in sessions were being handled and
initialised
2025-09-16 14:45:16 +02:00
Roland Geider
6cc96310c5 Simplify currentPlan 2025-09-12 14:37:32 +02:00
Roland Geider
0fd2af030d Merge branch 'refs/heads/master' into nutrition-plan-stats 2025-09-12 14:05:38 +02:00
Roland Geider
48d314f2a0 Use bigger pagination sizes when loading workout sessions 2025-09-07 15:26:08 +02:00