Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Refine onboarding auth copy and defaults

r4khul1f87b0122e15
diff --git a/mobile/apps/photos/changes/onboarding-auth-screens.md b/mobile/apps/photos/changes/onboarding-auth-screens.md
new file mode 100644
index 0000000000..f779e4069a
--- /dev/null
+++ b/mobile/apps/photos/changes/onboarding-auth-screens.md
@@ -0,0 +1 @@
+- Polished sign-up and login screens. The terms checkbox now starts unchecked and screen titles are clearer.
diff --git a/mobile/apps/photos/lib/ui/account/email_entry_page.dart b/mobile/apps/photos/lib/ui/account/email_entry_page.dart
index 0c69caf9a3..724125ddc5 100644
--- a/mobile/apps/photos/lib/ui/account/email_entry_page.dart
+++ b/mobile/apps/photos/lib/ui/account/email_entry_page.dart
@@ -43,7 +43,7 @@ class _EmailEntryPageState extends State<EmailEntryPage> {
double _passwordStrength = 0.0;
bool _emailIsValid = false;
bool _showEmailValidation = false;
- bool _hasAgreedToTOS = true;
+ bool _hasAgreedToTOS = false;
bool _hasInstallSource = false;
bool _passwordsMatch = false;
bool _passwordIsValid = false;
diff --git a/mobile/apps/photos/lib/ui/account/login_pwd_verification_page.dart b/mobile/apps/photos/lib/ui/account/login_pwd_verification_page.dart
index a0c51a376c..3dbc4aa03b 100644
--- a/mobile/apps/photos/lib/ui/account/login_pwd_verification_page.dart
+++ b/mobile/apps/photos/lib/ui/account/login_pwd_verification_page.dart
@@ -65,7 +65,7 @@ class _LoginPasswordVerificationPageState
},
),
title: Text(
- context.strings.logInLabel,
+ context.strings.enterPassword,
style: TextStyles.large.copyWith(color: colors.textBase),
),
centerTitle: true,
diff --git a/mobile/apps/photos/lib/ui/account/ott_verification_page.dart b/mobile/apps/photos/lib/ui/account/ott_verification_page.dart
index 7e283637a6..d2dcee425f 100644
--- a/mobile/apps/photos/lib/ui/account/ott_verification_page.dart
+++ b/mobile/apps/photos/lib/ui/account/ott_verification_page.dart
@@ -148,27 +148,53 @@ class _OTTVerificationPageState extends State<OTTVerificationPage> {
),
),
const SizedBox(height: 24),
- Align(
- alignment: Alignment.centerRight,
- child: ButtonComponent(
- label: context.strings.resendCode,
- variant: ButtonComponentVariant.link,
- size: ButtonComponentSize.small,
- onTap: () async {
- // ignore: unawaited_futures
- UserService.instance.sendOtt(
- context,
- widget.email,
- isCreateAccountScreen: widget.isCreateAccountScreen,
- isResetPasswordScreen: widget.isResetPasswordScreen,
- isChangeEmail: widget.isChangeEmail,
- );
- },
+ if (widget.isResetPasswordScreen)
+ Center(child: _buildResendCodeButton())
+ else
+ Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: [
+ Semantics(
+ button: true,
+ child: GestureDetector(
+ behavior: HitTestBehavior.opaque,
+ onTap: () => Navigator.of(context).pop(),
+ child: Padding(
+ padding: const EdgeInsets.symmetric(vertical: 14),
+ child: Text(
+ context.strings.changeEmail,
+ style: TextStyles.bodyLink.copyWith(
+ color: colors.textLight,
+ decorationColor: colors.textLight,
+ ),
+ ),
+ ),
+ ),
+ ),
+ _buildResendCodeButton(),
+ ],
),
- ),
],
),
),
);
}
+
+ Widget _buildResendCodeButton() {
+ return ButtonComponent(
+ label: context.strings.resendCode,
+ variant: ButtonComponentVariant.link,
+ size: ButtonComponentSize.small,
+ onTap: () async {
+ // ignore: unawaited_futures
+ UserService.instance.sendOtt(
+ context,
+ widget.email,
+ isCreateAccountScreen: widget.isCreateAccountScreen,
+ isResetPasswordScreen: widget.isResetPasswordScreen,
+ isChangeEmail: widget.isChangeEmail,
+ );
+ },
+ );
+ }
}
diff --git a/mobile/apps/photos/lib/ui/account/passkey_page.dart b/mobile/apps/photos/lib/ui/account/passkey_page.dart
index 4a0b8899ab..11eb9f694d 100644
--- a/mobile/apps/photos/lib/ui/account/passkey_page.dart
+++ b/mobile/apps/photos/lib/ui/account/passkey_page.dart
@@ -162,7 +162,7 @@ class _PasskeyPageState extends State<PasskeyPage> {
},
),
title: Text(
- context.strings.passkey,
+ context.strings.passkeyAuthTitle,
style: TextStyles.large.copyWith(color: colors.textBase),
),
centerTitle: true,
@@ -181,9 +181,22 @@ class _PasskeyPageState extends State<PasskeyPage> {
const Spacer(),
Text(
context.strings.waitingForVerification,
- style: TextStyles.body.copyWith(color: colors.textLight),
+ style: TextStyles.body.copyWith(color: colors.textBase),
textAlign: TextAlign.center,
),
+ if (widget.totp2FASessionID.isNotEmpty)
+ ButtonComponent(
+ label: context.strings.useTwoFactorInstead,
+ variant: ButtonComponentVariant.link,
+ size: ButtonComponentSize.small,
+ onTap: () async {
+ // ignore: unawaited_futures
+ routeToPage(
+ context,
+ TwoFactorAuthenticationPage(widget.totp2FASessionID),
+ );
+ },
+ ),
const Spacer(),
ButtonComponent(
label: context.strings.tryAgain,
@@ -207,21 +220,6 @@ class _PasskeyPageState extends State<PasskeyPage> {
}
},
),
- if (widget.totp2FASessionID.isNotEmpty) ...[
- const SizedBox(height: 16),
- ButtonComponent(
- label: context.strings.loginWithTOTP,
- variant: ButtonComponentVariant.link,
- size: ButtonComponentSize.small,
- onTap: () async {
- // ignore: unawaited_futures
- routeToPage(
- context,
- TwoFactorAuthenticationPage(widget.totp2FASessionID),
- );
- },
- ),
- ],
const SizedBox(height: 12),
ButtonComponent(
label: context.strings.recoverAccount,
diff --git a/mobile/apps/photos/lib/ui/account/password_entry_page.dart b/mobile/apps/photos/lib/ui/account/password_entry_page.dart
index cc1394c980..3d067c400c 100644
--- a/mobile/apps/photos/lib/ui/account/password_entry_page.dart
+++ b/mobile/apps/photos/lib/ui/account/password_entry_page.dart
@@ -82,7 +82,7 @@ class _PasswordEntryPageState extends State<PasswordEntryPage> {
} else if (widget.mode == PasswordEntryMode.reset) {
title = context.strings.resetPasswordTitle;
} else if (_volatilePassword != null) {
- title = context.strings.encryptionKeys;
+ title = context.strings.recoveryKey;
}
final isFormValid = _passwordsMatch && _isPasswordValid;
@@ -417,7 +417,7 @@ class _PasswordEntryPageState extends State<PasswordEntryPage> {
context,
RecoveryKeyPage(
result.privateKeyAttributes.recoveryKey,
- context.strings.continueLabel,
+ context.strings.next,
onDone: onDone,
isOnboarding: true,
),
diff --git a/mobile/apps/photos/lib/ui/account/recovery_page.dart b/mobile/apps/photos/lib/ui/account/recovery_page.dart
index 8cfc12fc47..1d9540773e 100644
--- a/mobile/apps/photos/lib/ui/account/recovery_page.dart
+++ b/mobile/apps/photos/lib/ui/account/recovery_page.dart
@@ -43,7 +43,7 @@ class _RecoveryPageState extends State<RecoveryPage> {
},
),
title: Text(
- context.strings.recoverAccount,
+ context.strings.forgotPassword,
style: TextStyles.large.copyWith(color: colors.textBase),
),
centerTitle: true,
diff --git a/mobile/apps/photos/lib/ui/account/two_factor_authentication_page.dart b/mobile/apps/photos/lib/ui/account/two_factor_authentication_page.dart
index 90279ff516..bd34debd8d 100644
--- a/mobile/apps/photos/lib/ui/account/two_factor_authentication_page.dart
+++ b/mobile/apps/photos/lib/ui/account/two_factor_authentication_page.dart
@@ -107,12 +107,6 @@ class _TwoFactorAuthenticationPageState
child: Column(
children: [
const SizedBox(height: 24),
- Text(
- context.strings.twoFAVerification,
- style: TextStyles.body.copyWith(color: colors.textBase),
- textAlign: TextAlign.center,
- ),
- const SizedBox(height: 8),
Text(
context.strings.enterThe6digitCodeFromnyourAuthenticatorApp,
style: TextStyles.body.copyWith(color: colors.textLight),
diff --git a/mobile/packages/strings/lib/l10n/arb/strings_en.arb b/mobile/packages/strings/lib/l10n/arb/strings_en.arb
index ac13021f75..31bb0ba21a 100644
--- a/mobile/packages/strings/lib/l10n/arb/strings_en.arb
+++ b/mobile/packages/strings/lib/l10n/arb/strings_en.arb
@@ -4720,6 +4720,10 @@
"@useRecoveryKey": {
"description": "Use recovery key button label"
},
+ "useTwoFactorInstead": "Use 2FA instead",
+ "@useTwoFactorInstead": {
+ "description": "Link on the passkey verification screen to verify with an authenticator code instead"
+ },
"username": "Username",
"usernameHint": "Login ID or email",
"useSelectedPhoto": "Use selected photo",