Commit Graph

121 Commits

Author SHA1 Message Date
Roland Geider
57947eabe6 Don't default to black text
Otherwise this might be unreadable on dark mode
2026-06-05 14:47:36 +02:00
Roland Geider
40e3b560d1 Fix tests 2026-06-04 22:56:35 +02:00
Roland Geider
e29c120d7f Add more validators
Otherwise the server might reject the values (this was already the case)
2026-06-04 21:42:02 +02:00
Roland Geider
ca2530ecab Better error handling for powersync errors
This new logic properly handles retriable and transient errors
2026-06-04 20:41:06 +02:00
Roland Geider
0d3d7d7cba Remove unused translation keys 2026-06-04 17:25:34 +02:00
Roland Geider
68428a053e Wipe the local DB only on a real user switch 2026-06-04 16:53:01 +02:00
Roland Geider
6436226a9e Remove network info dashboard widget
This is not really needed anymore since most parts of the application can be used
offline, and the ones that don't are marked.
2026-05-25 19:48:12 +02:00
Roland Geider
3204df14ef Properly filter the ingredient list 2026-05-25 17:01:26 +02:00
Roland Geider
1f55069b97 Don't rebuild on every keystroke 2026-05-25 15:15:58 +02:00
Roland Geider
a7e30fcf8c Refactor auth screen
This has been split up into several individual widgets and (hopefully) made
more user friendly
2026-05-24 20:14:25 +02:00
Roland Geider
ea3087792c Merge branch 'feature/allauth' into feature/offline-mode 2026-05-22 22:30:45 +02:00
Roland Geider
fe5c7bb0ef Regenerate build files 2026-05-22 20:18:49 +02:00
Roland Geider
99f54a830d Regenerate build files 2026-05-22 20:11:23 +02:00
Roland Geider
6188175c1a Add 2fa login screen 2026-05-22 20:08:44 +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
af8ed102eb Also write to the user profile via powersync 2026-05-22 17:59:16 +02:00
Roland Geider
d97de48fee Refactor the error logic
UI related functions have been moved to error_dialogs.dart, while everything else
is kept in errors.dart
2026-05-22 15:50:33 +02:00
Roland Geider
848ba17d54 Format number inputs according to locale
Due to some idiosyncrasies of the on-screen keyboards where we can neither control nor
know what separator it shows, and the way intl parses work (in the "de" locale 80.5 is
parsed to 805.0), we need to roll our own
2026-05-21 14:51:05 +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
97e0e631ab Consolidate submission logic into its own widget
While this is not needed as much now that we save everything to the local
sqlite, it's still good practice to encapsulate the logic for a submit button
with a spinner.
2026-05-21 00:26:15 +02:00
Roland Geider
dc5bd1e975 Consolidate localized number edit logic into its own widgets 2026-05-21 00:11:40 +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
bf9916adf9 Merge remote-tracking branch 'origin/master' into feature/offline-mode
# Conflicts:
#	ios/Podfile.lock
#	lib/l10n/app_en.arb
#	lib/main.dart
#	lib/providers/user.dart
#	lib/widgets/core/settings.dart
#	pubspec.yaml
#	test/core/settings_test.dart
#	test/core/settings_test.mocks.dart
#	test/user/provider_test.dart
2026-05-20 16:55:17 +02:00
Pawel Haracz
af2d4b4191 feat(language): implement language switcher functionality and tests 2026-05-16 23:52:46 +02:00
Roland Geider
f4c8db73ee Properly use mutable objects 2026-05-08 12:34:19 +02:00
Roland Geider
39eaf9abe0 Make the linter happy 2026-05-07 21:42:23 +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
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
2ce3cc223c Cleanup 2026-05-03 12:37:16 +02:00
Roland Geider
9f365f8069 Consolidate ingredient search methods into the ingredient repo 2026-05-01 12:27:49 +02:00
Roland Geider
350561101b Be a bit smarter about contructing the absolute URL for images 2026-04-30 10:49:26 +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
kiranannadatha8
a5114851fe feat(nutrition): filter ingredient search by Nutri-Score
Adds a "Filter by Nutri-Score" switch and an A–E discrete slider to
the ingredient search filter popover. The worst acceptable grade is
sent to the backend as `nutriscore__lte=<a|b|c|d|e>`, matching the
new filter exposed by wger-project/wger#2295.

- Extend `IngredientFilters` with `filterNutriscore` + `nutriscoreMax`
- Persist both settings through `PreferenceHelper`
- Expose `toggleNutriscore` and `chooseNutriscoreMax` on the riverpod
  notifier
- Propagate `nutriscoreMax` through `NutritionPlansProvider.searchIngredient`
- Add English strings `filterNutriscore` / `filterNutriscoreMax`
- Widget tests cover: slider hidden until switch flipped, query emitted
  with/without the filter
- Update stale generated Mockito overrides across the four test files
  that mock `NutritionPlansProvider` so the new named arg lines up

Refs wger-project/wger#2295
2026-04-19 01:44:59 -04:00
Roland Geider
95fb6c6615 Migrate the nutrition provider to riverpod 2026-04-17 18:19:00 +02:00
Roland Geider
f4a0a9bff6 Migrate the user provider to riverpode 2026-04-17 17:11:59 +02:00
Roland Geider
8ad3585ce6 Refactor the auth provider, and move it to riverpod 2026-04-17 16:25:04 +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
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
40dbe842cd Move the variation to a field in the exercise 2026-04-13 12:58:17 +02:00
Roland Geider
9f41695e65 Merge branch 'feature/nutrition-units' into feature/version-2.5
# Conflicts:
#	test/nutrition/goldens/nutritional_plan_2_one_meal_with_ingredients.png
#	test/nutrition/goldens/nutritional_plan_3_both_meals_with_ingredients.png
2026-04-10 10:38:31 +02:00
Roland Geider
bdc5e541e2 Merge branch 'feature/markdown-exercises' into feature/version-2.5 2026-04-10 10:35:34 +02:00
Roland Geider
301c2e42ce Merge branch 'feature/add-warmup-type' into feature/version-2.5
# Conflicts:
#	test/core/validators_test.mocks.dart
2026-04-10 10:35:10 +02:00
Roland Geider
ed8203de09 Expose units in the nutritional plan 2026-03-31 11:46:38 +02:00
Roland Geider
61e1c241f2 Update measurement tables to use powersync 2026-03-13 16:16:23 +01:00
Roland Geider
a5f08c09ac Add the network information widget to regular list of dashboard widgets 2026-03-13 14:52:13 +01:00
Roland Geider
c87d3825b4 Merge branch 'master' into feature/offline-mode
# Conflicts:
#	lib/l10n/app_en.arb
#	lib/models/workouts/log.dart
#	lib/models/workouts/weight_unit.dart
#	lib/providers/exercises.dart
#	lib/providers/gym_log_state.g.dart
#	lib/providers/routines.dart
#	lib/widgets/routines/forms/reps_unit.dart
#	lib/widgets/routines/forms/weight_unit.dart
#	lib/widgets/routines/gym_mode/log_page.dart
#	macos/Flutter/GeneratedPluginRegistrant.swift
#	pubspec.lock
#	pubspec.yaml
#	test/core/settings_test.mocks.dart
#	test/core/validators_test.mocks.dart
#	test/exercises/contribute_exercise_test.mocks.dart
#	test/exercises/exercise_provider_db_test.dart
#	test/exercises/exercises_detail_widget_test.mocks.dart
#	test/routine/gym_mode/gym_mode_test.mocks.dart
#	test/routine/repetition_unit_form_widget_test.dart
#	test/routine/routines_provider_test.mocks.dart
#	test/routine/routines_screen_test.mocks.dart
#	test/routine/weight_unit_form_widget_test.dart
#	test/weight/weight_provider_test.mocks.dart
#	test/weight/weight_screen_test.mocks.dart
#	test/widgets/routines/gym_mode/log_page_test.mocks.dart
#	test_data/routines.dart
2026-03-12 14:23:11 +01:00
Roland Geider
885d88180b Refactor ingredient filter provider
No need to hard code the preferences in main
2026-03-11 15:39:38 +01:00
Roland Geider
07604ab57d Add "warmup" to list of slot entry types
https://github.com/wger-project/wger/issues/2157
2026-03-02 20:18:32 +01:00