Commit Graph

161 Commits

Author SHA1 Message Date
Roland Geider
63e9d812db Consolidate usage of DateInputWidget 2026-06-14 22:11:31 +02:00
Roland Geider
0651cbb611 Consolidate usage of showConfirmDeleteDialog 2026-06-14 22:11:11 +02:00
Roland Geider
16a6cd085d Harden detail screen pages
While not very probable, it can happen that a routine etc was deleted on the server
at the same time that a user had opened its detail page. We also changed the argument
for the nutrition screen to ID, for more consistency with the other ones.
2026-06-05 14:39:49 +02:00
Roland Geider
a923574638 Show a bit more info for RetryableUploadException 2026-06-04 21:10:03 +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
6f0a322b4a Add outgoing icons to external links 2026-05-26 20:02:58 +02:00
Roland Geider
00db3d96e6 Properly online-gate access to the user profile 2026-05-26 19:57:11 +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
c8b1aa3b24 Online-gate the exercise submission page/links 2026-05-25 19:40:19 +02:00
Roland Geider
987d82b4a5 Better validators for min/max constrained values 2026-05-25 12:47:31 +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
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
83569fc41e Merge remote-tracking branch 'origin/master' into feature/offline-mode 2026-05-07 22:05:41 +02:00
Roland Geider
39eaf9abe0 Make the linter happy 2026-05-07 21:42:23 +02:00
Roland Geider
ca18f34d4c Update calls from deprecated APIs 2026-05-07 17:47:40 +02:00
Roland Geider
c39c418d37 Merge master 2026-05-03 19:15:21 +02:00
Roland Geider
390dadcdf0 Cleanup 2026-05-03 18:21:54 +02:00
AlexisBirling3
7fb64b2925 shortens the displayed error message and adds link to doc 2026-05-03 18:12:33 +02:00
AlexisBirling3
67f1569148 adds i18n for the new widget 2026-05-03 18:12:33 +02:00
AlexisBirling3
7d2b842f1a adds a helper class to check sanity and implements widget to display sanity after auth 2026-05-03 18:12:33 +02:00
pankaj-basnet
1a9ab581a5 refactor: improve image error handling with pattern matching and URI parsing 2026-05-03 02:26:58 +05:45
Roland Geider
209ab7cbbe Add gallery sync tables 2026-05-01 15:25:31 +02:00
Roland Geider
4751b2ddc3 Delete old images from the device older than approx. 3 months 2026-04-30 10:48:57 +02:00
Roland Geider
d135e81d4f Cache ingredient and exercise images on device 2026-04-30 10:48:20 +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
4b581173d8 Show more sync information to the user 2026-04-24 14:44:04 +02:00
Roland Geider
72ef83e1a2 Translate the sync status in the main icon 2026-04-24 13:15:24 +02:00
Roland Geider
c1d2fbe67b Show loading spinner for the routine widget in the dashboard 2026-04-23 15:38:21 +02:00
Roland Geider
f5ab4ca390 Handle HTTP errors
If the indetify the error as having HTML (e.g. during development, a wrongly configured
reverse proxy, etc.) render the HTML instead
2026-04-23 13:33:10 +02:00
Roland Geider
f7458f86f5 Add unreachable server screen and related error handling 2026-04-23 12:41:37 +02:00
Roland Geider
1258382957 Use common widget to render AsyncValues (errors, loading, etc.) 2026-04-18 23:02:17 +02:00
Roland Geider
8252dcdd74 Properly check if the userprofile was correctly loaded 2026-04-18 16:21:41 +02:00
Roland Geider
c1a733b423 Clear the powersync database when a user logs out 2026-04-17 22:48:14 +02:00
Roland Geider
97dee19368 Migrate the gallery provider to riverpod 2026-04-17 21:12:34 +02: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
7221109a64 Revert to using ID and UUID as names for the fields
This is more explicit and seems like a better way to do it.
2026-03-13 22:58:11 +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