Add hint to sign in with 2FA enabled

This commit is contained in:
Ming Ming 2021-06-22 22:45:34 +08:00
parent e1a5dbb843
commit c631b68266
2 changed files with 15 additions and 0 deletions

View file

@ -245,6 +245,10 @@
"@signInHeaderText": { "@signInHeaderText": {
"description": "Inform user what to do in sign in widget" "description": "Inform user what to do in sign in widget"
}, },
"signIn2faHintText": "*Use an app password if you have two-factor authentication enabled in the server",
"@signIn2faHintText": {
"description": "Notify users with 2FA enabled what should be done in order to sign in correctly"
},
"serverAddressInputHint": "Sever address", "serverAddressInputHint": "Sever address",
"@serverAddressInputHint": { "@serverAddressInputHint": {
"description": "Hint of the text field expecting server address data" "description": "Hint of the text field expecting server address data"

View file

@ -63,6 +63,17 @@ class _SignInState extends State<SignIn> {
child: _buildForm(context), child: _buildForm(context),
), ),
), ),
Container(
alignment: AlignmentDirectional.centerStart,
constraints: const BoxConstraints(
maxWidth: AppTheme.widthLimitedContentMaxWidth),
padding: const EdgeInsets.symmetric(
horizontal: 32, vertical: 16),
child: Text(
AppLocalizations.of(context).signIn2faHintText,
style: TextStyle(fontStyle: FontStyle.italic),
),
),
if (!platform_k.isWeb) Expanded(child: Container()), if (!platform_k.isWeb) Expanded(child: Container()),
Container( Container(
constraints: const BoxConstraints( constraints: const BoxConstraints(