Skip to content

Conversation

Harshit933
Copy link
Contributor

Added screen which redirects to the user form whenever the user tries to add an exercise when their email is not verified.

Related Issues (if applicable)

Please check that the PR fulfills these requirements

  • Set a 100 character limit in your editor/IDE to avoid white space diffs in the PR
  • Tests for the changes have been added (for bug fixes / features)
  • Added yourself to AUTHORS.md

@Harshit933
Copy link
Contributor Author

fixes #258

@rolandgeider rolandgeider linked an issue Jan 29, 2023 that may be closed by this pull request
@rolandgeider
Copy link
Member

Great, will try to review this later today

mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
'Your profile needs to be verified in order to add any exercise',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you mark the text as translatable? You just need to add an entry to app_en.arb and then you can use it with AppLocalizations.of(context).foo (sometimes the IDE doesn't pick this up right away and complains that foo doesn't exists, but the app builds just fine).

I would also suggest that we use the same text as in the web application: "You can only contribute exercises if your account is older than {{days}} days and have verified your email". We can just store the number of days in consts.dart with 14, at the moment this is not configurable.

'Your profile needs to be verified in order to add any exercise',
style: TextStyle(
color: Colors.black,
fontSize: 30,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps not hard code the font size here? Something like style: Theme.of(context).textTheme.headline4 is probably better if we change the theme

child: Container(
padding: EdgeInsets.all(15),
child: Text(
'Profile Screen',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, just use AppLocalizations.of(context).userProfile (and something like a TextButton?)

@Harshit933
Copy link
Contributor Author

Got it!

@Harshit933
Copy link
Contributor Author

@rolandgeider done all the fixes!

@rolandgeider rolandgeider merged commit 57e7464 into wger-project:master Feb 6, 2023
@rolandgeider
Copy link
Member

Merged, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Block user from accessing exercise contribution page
2 participants