Commit Graph

144 Commits

Author SHA1 Message Date
Roland Geider
8fc149741f Edit the user's email via allauth's endpoints 2026-05-22 20:10:47 +02:00
Roland Geider
87a40fd4e6 Switch the pasted-token field from DRF tokens to refresh tokens 2026-05-22 20:08:43 +02:00
Roland Geider
42752de182 Move Authorization header to a dedicated HTTP client 2026-05-22 20:08:07 +02:00
Roland Geider
af8ed102eb Also write to the user profile via powersync 2026-05-22 17:59:16 +02:00
Roland Geider
51730e956e Make more widgets online-aware 2026-05-22 16:49:59 +02:00
Roland Geider
52364ebafc Merge branch 'master' into feature/offline-mode
# Conflicts:
#	lib/helpers/errors.dart
#	lib/main.dart
#	lib/widgets/nutrition/forms.dart
#	lib/widgets/routines/forms/slot_entry.dart
2026-05-21 12:26:53 +02:00
Roland Geider
834d7e4744 Consolidate form error handling
This makes the widgets themselves leaner
2026-05-21 09:33:57 +02:00
Roland Geider
c411e8949a Consolidate time and date picking logic into their own widgets
This makes it easier to fix things like localization, etc. in one place
2026-05-20 23:59:14 +02:00
Roland Geider
7e7b441faa Properly handle localized inputs in further forms 2026-05-20 21:36:49 +02:00
Roland Geider
25b444103f Correctly load the notes and aliases for exercises 2026-05-20 16:34:21 +02:00
Roland Geider
f8187b293f Cleanup exercise models
Save the dependant object (such as language), and not the ID as well as the object.
2026-05-20 16:10:27 +02:00
Roland Geider
cbf6884a30 Update the online connectivity gates
Some of these models can now be edited completely locally, others only partly
(e.g. the gallery entries can only be created online)
2026-05-20 14:14:00 +02:00
Roland Geider
130232ead8 Remove null assertions where not needed 2026-05-08 10:58:40 +02:00
Roland Geider
395eb58cbd Merge remote-tracking branch 'origin/master' into feature/offline-mode 2026-05-07 14:16:58 +02:00
Roland Geider
c93f03fa0b Replace pumpAndSettle with pump where possible 2026-05-07 12:27:33 +02:00
Roland Geider
c39c418d37 Merge master 2026-05-03 19:15:21 +02:00
Roland Geider
164d553fde Improve the exercise search autocompleter
Closes #1182
Co-authored-by: Pankaj Basnet <165250380+pankaj-basnet@users.noreply.github.com>
2026-05-03 17:54:07 +02:00
Roland Geider
1249036cce Properly update routine data
Since this happens in the backend only, we need to refetch everything, when
the user edits one of the routine's models
2026-05-03 12:17:23 +02:00
Roland Geider
1ec921faf3 Consistent usage of uuid IDs
Now these fields are always nullable on the model and get a value once they
are persisted to the (local) database.
2026-05-03 12:17:23 +02:00
Roland Geider
c1dccbd822 Make the "impression" in workout session an enum
This is cleaner and simplifies a handful of places
2026-05-03 12:17:23 +02:00
Roland Geider
cf13af1740 Sync the rest of the nutrition tables to powersync 2026-05-01 20:24:26 +02:00
Roland Geider
e56d5a8861 Add missing tests for the new repositories and states 2026-05-01 19:03:28 +02:00
Roland Geider
2cb40612b1 Cleanup providers and use consistent naming 2026-05-01 16:58:08 +02:00
Roland Geider
5d30a1ca79 Cleanup providers and use consistent naming 2026-05-01 16:50:15 +02:00
Roland Geider
2f2c7812cb Cleanup providers and use consistent naming 2026-05-01 16:18:29 +02:00
Roland Geider
16ffafeb28 Remove unused methods 2026-05-01 15:36:15 +02:00
Roland Geider
209ab7cbbe Add gallery sync tables 2026-05-01 15:25:31 +02:00
Roland Geider
d1f6fc2dfe Sync nutritional logs 2026-04-30 18:10:02 +02:00
Roland Geider
d6e652f2c9 Sync the ingredient weight units to the local sqlite db 2026-04-30 13:41:58 +02:00
Roland Geider
3fbdaac4b3 Consolidate routine hydration logic 2026-04-29 19:58:22 +02:00
Roland Geider
271d9f9835 Refactor unit selection for repetitions and weight
This is now done inline with a suffix icon, instead of having an extra
toggle that showed an explicit dropdown. Existing logs can now be edited
in the routine log overview page.
2026-04-29 16:56:06 +02:00
Roland Geider
40c3bbc95c Use the workout session and logs from the current routine in summary.dart
This data is now always current from powersync
2026-04-29 12:59:34 +02:00
Roland Geider
c5dbcc27ef Extract routines repository to its own file 2026-04-29 10:56:17 +02:00
Roland Geider
680127e139 Sync the base Routine and Nutritional plan entries via powersync
This makes sure the lists is always kept current and allows the user to edit
them offline as well. Note that we still kepp the backend's ID here, so no
creation is possible.
2026-04-29 10:03:59 +02:00
Roland Geider
b6923d1a6c Refactor exercise providers
The exercise provider now returns an ExerciseState, which exposes some filter
methods on the exercises
2026-04-24 12:26:43 +02:00
Roland Geider
1258382957 Use common widget to render AsyncValues (errors, loading, etc.) 2026-04-18 23:02:17 +02:00
Roland Geider
d70c43e893 Properly gate the parts of the application that need network connectivity 2026-04-18 21:43:16 +02:00
Roland Geider
9a4fec8bf3 Refactor the workout session provider
The logs are read in the session repository, the logs one is only used
for CRUD operations
2026-04-18 18:19:31 +02:00
Roland Geider
af378dfdb3 Make the routines provider async
This makes the behaviour consistent with the others
2026-04-18 17:40:45 +02:00
Roland Geider
0afb1026a9 Further refactor how the new providers fetch data 2026-04-18 17:06:44 +02:00
Roland Geider
8ad3585ce6 Refactor the auth provider, and move it to riverpod 2026-04-17 16:25:04 +02:00
Roland Geider
70dff579d4 Fix tests 2026-04-17 15:46:34 +02:00
Roland Geider
6dea8d5e8f Merge branch 'master' into feature/offline-mode 2026-04-17 12:32:11 +02:00
Roland Geider
9c531a7799 Merge branch 'master' into feature/offline-mode
# Conflicts:
#	integration_test/1_dashboard.dart
#	integration_test/3_gym_mode.dart
#	ios/Podfile.lock
#	lib/database/exercises/exercise_database.dart
#	lib/database/exercises/type_converters.dart
#	lib/models/exercises/exercise.dart
#	lib/models/exercises/exercise.g.dart
#	lib/models/exercises/exercise_api.dart
#	lib/models/exercises/exercise_api.freezed.dart
#	lib/models/exercises/exercise_api.g.dart
#	lib/models/exercises/translation.dart
#	lib/models/exercises/translation.g.dart
#	lib/models/exercises/variation.dart
#	lib/providers/exercises.dart
#	lib/widgets/add_exercise/steps/step_1_basics.dart
#	lib/widgets/add_exercise/steps/step_2_variations.dart
#	lib/widgets/exercises/exercises.dart
#	lib/widgets/measurements/forms.dart
#	lib/widgets/routines/forms/slot.dart
#	pubspec.lock
#	pubspec.yaml
#	test/core/settings_test.mocks.dart
#	test/exercises/contribute_exercise_image_test.mocks.dart
#	test/exercises/contribute_exercise_test.mocks.dart
#	test/exercises/exercise_provider_load_test.dart
#	test/exercises/exercise_provider_test.dart
#	test/exercises/exercises_detail_widget_test.dart
#	test/exercises/exercises_detail_widget_test.mocks.dart
#	test/exercises/model_exercise_test.dart
#	test/measurements/measurement_entries_screen_test.dart
#	test/routine/gym_mode/gym_mode_test.dart
#	test/routine/gym_mode/gym_mode_test.mocks.dart
#	test/routine/routines_provider_test.mocks.dart
#	test/weight/weight_screen_test.mocks.dart
#	test/widgets/routines/gym_mode/log_page_test.mocks.dart
#	test_data/measurements.dart
2026-04-17 12:23:56 +02:00
Roland Geider
bceae559f7 Merge branch 'master' into feature/version-2.5 2026-04-14 12:10:20 +02:00
Roland Geider
10a28ac479 Merge pull request #1175 from efrahim20319/fix/1149-log-missing-unit-defaults
fix: use unit IDs directly in Log.fromSetConfigData to prevent null on save
2026-04-13 19:57:49 +02:00
Nsimba Tamaku
fd8545f997 fix: use unit IDs directly in Log.fromSetConfigData to prevent null on save
When adding an extra exercise during a workout, addExerciseAfterPage()
creates a SetConfigData with no unit objects loaded. Log.fromSetConfigData
was using the weightUnit/repetitionUnit setters which overwrite the default
IDs with null when the objects are null, causing the server to reject the
request with a ValidationError ("Repetitions unit must be present").

Fixes #1149

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 17:10:59 +01:00
Roland Geider
44af2ecaf2 Merge branch 'feature/exercise-variations' into feature/version-2.5
# Conflicts:
#	lib/models/exercises/exercise_submission.dart
#	lib/providers/add_exercise.dart
2026-04-13 16:37:07 +02:00
Roland Geider
0c5d9b83b6 Commit missing mock file 2026-04-13 16:32:08 +02:00
Roland Geider
40dbe842cd Move the variation to a field in the exercise 2026-04-13 12:58:17 +02:00