Commit Graph

1332 Commits

Author SHA1 Message Date
Roland Geider
c8b1aa3b24 Online-gate the exercise submission page/links 2026-05-25 19:40:19 +02:00
Roland Geider
a485fd21df Split gym state and notifier into their own files 2026-05-25 17:58:23 +02:00
Roland Geider
92d731fa10 Don't rebuild the whole widget on every keystroke 2026-05-25 17:35:36 +02:00
Roland Geider
6849685ae7 Watch the passed ingredient 2026-05-25 17:13:12 +02:00
Roland Geider
5194a6c869 Refactor the ingredient detail screen
We now use the exact same widget as in the regular info dialog
2026-05-25 16:45:51 +02:00
Roland Geider
5c916241b6 Make the ingredient object nullable for logs and meal items
This is needed due to the way powersync works. In practice, this will only be null during
a very small time window between editing the model and the sync back from the backend.
2026-05-25 15:51:34 +02:00
Roland Geider
1f55069b97 Don't rebuild on every keystroke 2026-05-25 15:15:58 +02:00
Roland Geider
34b1fa6a86 Merge branch 'feature/offline-mode' into feat/nutrition-ingredients-implementation
# Conflicts:
#	lib/providers/ingredient_notifier.dart
2026-05-25 13:44:48 +02:00
Roland Geider
806fc93116 Cleanup 2026-05-25 13:41:22 +02:00
Roland Geider
78580084a2 Better validators for nutritional plan values 2026-05-25 13:39:44 +02:00
Roland Geider
0f4a12251d Better validators for workout session notes 2026-05-25 13:31:20 +02:00
Roland Geider
e7d0028251 Fix bug in the measurements overview 2026-05-25 13:28:44 +02:00
Roland Geider
45e693dae6 Better validators for min/max constrained values 2026-05-25 12:56:03 +02:00
Roland Geider
987d82b4a5 Better validators for min/max constrained values 2026-05-25 12:47:31 +02:00
Roland Geider
b3b138765a Better validators for workout sessions 2026-05-25 12:41:05 +02:00
Roland Geider
dff9ed559c Better validators for logs 2026-05-25 12:33:39 +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
d77fc070d2 More cleanup on the auth screen 2026-05-22 23:32:09 +02:00
Roland Geider
aaa788570d Cleanup auth screen 2026-05-22 22:50:50 +02:00
Roland Geider
ea3087792c Merge branch 'feature/allauth' into feature/offline-mode 2026-05-22 22:30:45 +02:00
Roland Geider
cc7ae51906 Mark trophy box in the dashboard when no internet is available 2026-05-22 21:56:14 +02:00
Roland Geider
fe5c7bb0ef Regenerate build files 2026-05-22 20:18:49 +02:00
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
pankaj-basnet
a08defb3b6 feature(nutrition): refactor IngredientsScreen and create IngredientDetailScreen using existing components 2026-05-22 21:48:13 +05:45
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
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
cfa40da3b8 Remove obsolete FormProgressIndicator
Logs are now saved directly to the local sqlite db, which is basically instantaneous
2026-05-21 15:19:05 +02:00
Roland Geider
370a7d863a Remove obsolete _isSaving guard
Logs are now saved directly to the local sqlite db, which is basically instantaneous
2026-05-21 15:06:29 +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
cd2f3dbe45 Merge branch 'feature/offline-mode' into feat/nutrition-ingredients-implementation 2026-05-21 13:01:26 +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
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
9913ee4699 Use WgerImage to render the trophies
This also handles any possible errors that might occur loading the image
2026-05-20 23:12:36 +02:00
Roland Geider
7e7b441faa Properly handle localized inputs in further forms 2026-05-20 21:36:49 +02:00
Roland Geider
814c1cb915 Properly handle localized inputs in the goal macros widget
Closes #1197
2026-05-20 21:23:23 +02:00
pankaj-basnet
a5cb4e291b feat(nutrition): add ingredient filters model and repository, riverpod providers for ingredient state and filtering, reusable ingredient UI components and localization, integrate ingredients and nutritional plans screens
files added/modified:
      lib/models/nutrition/ingredient_filters.dart       lib/providers/ingredient_repository.dart
      lib/providers/ingredient_notifier.dart       lib/providers/ingredient_notifier.g.dart       lib/providers/ingredient_filters_notifier.dart       lib/providers/ingredient_filters_notifier.g.dart

      lib/l10n/app_en.arb       lib/widgets/nutrition/ingredient_list_tile.dart       lib/widgets/nutrition/ingredient_detail.dart       lib/widgets/nutrition/ingredient_filter_row.dart       lib/widgets/nutrition/ingredient_images.dart

      lib/main.dart       lib/screens/ingredients_screen.dart       lib/screens/ingredient_screen.dart       lib/screens/nutritional_plans_screen.dart
2026-05-20 21:51:11 +05:45
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
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
0674066f12 Remove unused code and mocks 2026-05-20 14:19:45 +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
dcebb3a2e7 Add script to check language lists stay in sync
This is also run on commits, so we get alerted when we forget to add new locales
2026-05-18 10:27:25 +02:00
Roland Geider
475442e779 Consolidate locale handling logic 2026-05-18 09:40:12 +02:00
Pawel Haracz
822cedf9a4 feat(settings): add in-app language switcher
Adds a per-user language override in Settings that takes precedence over
the system locale, fixing #439. Selecting "System default" clears the
override and falls back to the existing localeListResolutionCallback.

Also declares CFBundleLocalizations in the iOS Info.plist so iOS 16+ users
get the native per-app language picker (Settings → wger → Language) as an
alternative entry point.

Implementation mirrors the existing themeMode flow on UserProvider, with
the selected locale persisted in SharedPreferences under PREFS_USER_LOCALE
and matched against AppLocalizations.supportedLocales on load to preserve
script-bearing locales (zh_Hant, pt_BR, ...).
2026-05-16 15:31:34 +02:00
Roland Geider
944b27e38e Also sync all the license information, even if we don't expose all of that right now 2026-05-15 13:03:16 +02:00
Roland Geider
98737fde74 Extract helper functions as own widgets 2026-05-08 12:51:07 +02:00