Skip to content

armgit / ente

Public Imported from GitHub
0

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

update bottom sheets

AmanRajSinghMouryaf2f6f6cd5d65
diff --git a/mobile/apps/photos/lib/services/account/user_service.dart b/mobile/apps/photos/lib/services/account/user_service.dart
index 74fa6ba881..fa3ba144c3 100644
--- a/mobile/apps/photos/lib/services/account/user_service.dart
+++ b/mobile/apps/photos/lib/services/account/user_service.dart
@@ -42,6 +42,7 @@ import 'package:photos/ui/account/two_factor_authentication_page.dart';
import 'package:photos/ui/account/two_factor_recovery_page.dart';
import 'package:photos/ui/account/two_factor_setup_page.dart';
import "package:photos/ui/common/progress_dialog.dart";
+import "package:photos/ui/components/alert_bottom_sheet.dart";
import 'package:photos/ui/notification/toast.dart';
import "package:photos/ui/tabs/home_widget.dart";
import 'package:photos/utils/dialog_util.dart';
@@ -130,36 +131,39 @@ class UserService {
final String? enteErrCode = e.response?.data["code"];
if (enteErrCode != null && enteErrCode == "USER_ALREADY_REGISTERED") {
unawaited(
- showErrorDialog(
+ showAlertBottomSheet(
context,
- context.l10n.oops,
- context.l10n.emailAlreadyRegistered,
+ title: context.l10n.oops,
+ message: context.l10n.emailAlreadyRegistered,
+ assetPath: 'assets/warning-green.png',
),
);
} else if (enteErrCode != null && enteErrCode == "USER_NOT_REGISTERED") {
unawaited(
- showErrorDialog(
+ showAlertBottomSheet(
context,
- context.l10n.oops,
- context.l10n.emailNotRegistered,
+ title: context.l10n.oops,
+ message: context.l10n.emailNotRegistered,
+ assetPath: 'assets/warning-green.png',
),
);
} else if (e.response != null && e.response!.statusCode == 403) {
unawaited(
- showErrorDialog(
+ showAlertBottomSheet(
context,
- AppLocalizations.of(context).oops,
- AppLocalizations.of(context).thisEmailIsAlreadyInUse,
+ title: AppLocalizations.of(context).oops,
+ message: AppLocalizations.of(context).thisEmailIsAlreadyInUse,
+ assetPath: 'assets/warning-green.png',
),
);
} else {
- unawaited(showGenericErrorDialog(context: context, error: e));
+ unawaited(showGenericErrorBottomSheet(context: context, error: e));
}
} catch (e, s) {
await dialog.hide();
_logger.severe(e, s);
unawaited(
- showGenericErrorDialog(context: context, error: e),
+ showGenericErrorBottomSheet(context: context, error: e),
);
}
}
@@ -268,7 +272,7 @@ class UserService {
//to close and only then to show the error dialog.
Future.delayed(
const Duration(milliseconds: 150),
- () => showGenericErrorDialog(context: context, error: null),
+ () => showGenericErrorBottomSheet(context: context, error: null),
);
}
}
@@ -280,7 +284,7 @@ class UserService {
return await _gateway.getDeleteChallenge();
} catch (e) {
_logger.warning(e);
- await showGenericErrorDialog(context: context, error: e);
+ await showGenericErrorBottomSheet(context: context, error: e);
return null;
}
}
@@ -344,7 +348,7 @@ class UserService {
} catch (e) {
_logger.warning(e);
await dialog.hide();
- await showGenericErrorDialog(context: context, error: e);
+ await showGenericErrorBottomSheet(context: context, error: e);
}
}
@@ -406,28 +410,32 @@ class UserService {
_logger.info(e);
await dialog.hide();
if (e.response != null && e.response!.statusCode == 410) {
- await showErrorDialog(
+ await showAlertBottomSheet(
context,
- AppLocalizations.of(context).oops,
- AppLocalizations.of(context).yourVerificationCodeHasExpired,
+ title: AppLocalizations.of(context).oops,
+ message: AppLocalizations.of(context).yourVerificationCodeHasExpired,
+ assetPath: 'assets/warning-green.png',
);
Navigator.of(context).pop();
} else {
// ignore: unawaited_futures
- showErrorDialog(
+ showAlertBottomSheet(
context,
- AppLocalizations.of(context).incorrectCode,
- AppLocalizations.of(context).sorryTheCodeYouveEnteredIsIncorrect,
+ title: AppLocalizations.of(context).incorrectCode,
+ message:
+ AppLocalizations.of(context).sorryTheCodeYouveEnteredIsIncorrect,
+ assetPath: 'assets/warning-green.png',
);
}
} catch (e) {
await dialog.hide();
_logger.warning(e);
// ignore: unawaited_futures
- showErrorDialog(
+ showAlertBottomSheet(
context,
- AppLocalizations.of(context).oops,
- AppLocalizations.of(context).verificationFailedPleaseTryAgain,
+ title: AppLocalizations.of(context).oops,
+ message: AppLocalizations.of(context).verificationFailedPleaseTryAgain,
+ assetPath: 'assets/warning-green.png',
);
}
}
@@ -467,27 +475,31 @@ class UserService {
await dialog.hide();
if (e.response != null && e.response!.statusCode == 403) {
// ignore: unawaited_futures
- showErrorDialog(
+ showAlertBottomSheet(
context,
- AppLocalizations.of(context).oops,
- AppLocalizations.of(context).thisEmailIsAlreadyInUse,
+ title: AppLocalizations.of(context).oops,
+ message: AppLocalizations.of(context).thisEmailIsAlreadyInUse,
+ assetPath: 'assets/warning-green.png',
);
} else {
// ignore: unawaited_futures
- showErrorDialog(
+ showAlertBottomSheet(
context,
- AppLocalizations.of(context).incorrectCode,
- AppLocalizations.of(context).authenticationFailedPleaseTryAgain,
+ title: AppLocalizations.of(context).incorrectCode,
+ message:
+ AppLocalizations.of(context).authenticationFailedPleaseTryAgain,
+ assetPath: 'assets/warning-green.png',
);
}
} catch (e) {
await dialog.hide();
_logger.warning(e);
// ignore: unawaited_futures
- showErrorDialog(
+ showAlertBottomSheet(
context,
- AppLocalizations.of(context).oops,
- AppLocalizations.of(context).verificationFailedPleaseTryAgain,
+ title: AppLocalizations.of(context).oops,
+ message: AppLocalizations.of(context).verificationFailedPleaseTryAgain,
+ assetPath: 'assets/warning-green.png',
);
}
}
@@ -759,20 +771,24 @@ class UserService {
);
} else {
// ignore: unawaited_futures
- showErrorDialog(
+ showAlertBottomSheet(
context,
- AppLocalizations.of(context).incorrectCode,
- AppLocalizations.of(context).authenticationFailedPleaseTryAgain,
+ title: AppLocalizations.of(context).incorrectCode,
+ message:
+ AppLocalizations.of(context).authenticationFailedPleaseTryAgain,
+ assetPath: 'assets/warning-green.png',
);
}
} catch (e) {
await dialog.hide();
_logger.severe(e);
// ignore: unawaited_futures
- showErrorDialog(
+ showAlertBottomSheet(
context,
- AppLocalizations.of(context).oops,
- AppLocalizations.of(context).authenticationFailedPleaseTryAgain,
+ title: AppLocalizations.of(context).oops,
+ message:
+ AppLocalizations.of(context).authenticationFailedPleaseTryAgain,
+ assetPath: 'assets/warning-green.png',
);
}
}
@@ -823,10 +839,12 @@ class UserService {
);
} else {
// ignore: unawaited_futures
- showErrorDialog(
+ showAlertBottomSheet(
context,
- AppLocalizations.of(context).oops,
- AppLocalizations.of(context).somethingWentWrongPleaseTryAgain,
+ title: AppLocalizations.of(context).oops,
+ message:
+ AppLocalizations.of(context).somethingWentWrongPleaseTryAgain,
+ assetPath: 'assets/warning-green.png',
);
}
} catch (e) {
@@ -834,10 +852,11 @@ class UserService {
await dialog.hide();
_logger.severe(e);
// ignore: unawaited_futures
- showErrorDialog(
+ showAlertBottomSheet(
context,
- AppLocalizations.of(context).oops,
- AppLocalizations.of(context).somethingWentWrongPleaseTryAgain,
+ title: AppLocalizations.of(context).oops,
+ message: AppLocalizations.of(context).somethingWentWrongPleaseTryAgain,
+ assetPath: 'assets/warning-green.png',
);
} finally {
await dialog.hide();
@@ -874,10 +893,12 @@ class UserService {
);
} catch (e) {
await dialog.hide();
- await showErrorDialog(
+ await showAlertBottomSheet(
context,
- AppLocalizations.of(context).incorrectRecoveryKey,
- AppLocalizations.of(context).theRecoveryKeyYouEnteredIsIncorrect,
+ title: AppLocalizations.of(context).incorrectRecoveryKey,
+ message:
+ AppLocalizations.of(context).theRecoveryKeyYouEnteredIsIncorrect,
+ assetPath: 'assets/warning-green.png',
);
return;
}
@@ -918,10 +939,12 @@ class UserService {
);
} else {
// ignore: unawaited_futures
- showErrorDialog(
+ showAlertBottomSheet(
context,
- AppLocalizations.of(context).oops,
- AppLocalizations.of(context).somethingWentWrongPleaseTryAgain,
+ title: AppLocalizations.of(context).oops,
+ message:
+ AppLocalizations.of(context).somethingWentWrongPleaseTryAgain,
+ assetPath: 'assets/warning-green.png',
);
}
} catch (e) {
@@ -929,10 +952,11 @@ class UserService {
_logger.severe('unexpcted error during recovery', e);
// ignore: unawaited_futures
- showErrorDialog(
+ showAlertBottomSheet(
context,
- AppLocalizations.of(context).oops,
- AppLocalizations.of(context).somethingWentWrongPleaseTryAgain,
+ title: AppLocalizations.of(context).oops,
+ message: AppLocalizations.of(context).somethingWentWrongPleaseTryAgain,
+ assetPath: 'assets/warning-green.png',
);
} finally {
await dialog.hide();
@@ -973,7 +997,7 @@ class UserService {
try {
recoveryKey = await getOrCreateRecoveryKey(context);
} catch (e) {
- await showGenericErrorDialog(context: context, error: e);
+ await showGenericErrorBottomSheet(context: context, error: e);
return false;
}
final dialog =
@@ -999,19 +1023,23 @@ class UserService {
if (e is DioException) {
if (e.response != null && e.response!.statusCode == 401) {
// ignore: unawaited_futures
- showErrorDialog(
+ showAlertBottomSheet(
context,
- AppLocalizations.of(context).incorrectCode,
- AppLocalizations.of(context).pleaseVerifyTheCodeYouHaveEntered,
+ title: AppLocalizations.of(context).incorrectCode,
+ message:
+ AppLocalizations.of(context).pleaseVerifyTheCodeYouHaveEntered,
+ assetPath: 'assets/warning-green.png',
);
return false;
}
}
// ignore: unawaited_futures
- showErrorDialog(
+ showAlertBottomSheet(
context,
- AppLocalizations.of(context).somethingWentWrong,
- AppLocalizations.of(context).pleaseContactSupportIfTheProblemPersists,
+ title: AppLocalizations.of(context).somethingWentWrong,
+ message: AppLocalizations.of(context)
+ .pleaseContactSupportIfTheProblemPersists,
+ assetPath: 'assets/warning-green.png',
);
}
return false;
@@ -1034,10 +1062,12 @@ class UserService {
} catch (e) {
await dialog.hide();
_logger.severe("Failed to disabled 2FA", e);
- await showErrorDialog(
+ await showAlertBottomSheet(
context,
- AppLocalizations.of(context).somethingWentWrong,
- AppLocalizations.of(context).pleaseContactSupportIfTheProblemPersists,
+ title: AppLocalizations.of(context).somethingWentWrong,
+ message: AppLocalizations.of(context)
+ .pleaseContactSupportIfTheProblemPersists,
+ assetPath: 'assets/warning-green.png',
);
}
}
diff --git a/mobile/apps/photos/lib/ui/account/delete_account_page.dart b/mobile/apps/photos/lib/ui/account/delete_account_page.dart
index c6e5017904..8bf015c0f3 100644
--- a/mobile/apps/photos/lib/ui/account/delete_account_page.dart
+++ b/mobile/apps/photos/lib/ui/account/delete_account_page.dart
@@ -273,7 +273,10 @@ class _DeleteAccountPageState extends State<DeleteAccountPage> {
isDismissible: false,
);
if (choice!.action == ButtonAction.error) {
- await showGenericErrorDialog(context: context, error: choice.exception);
+ await showGenericErrorBottomSheet(
+ context: context,
+ error: choice.exception,
+ );
}
}
@@ -303,7 +306,7 @@ class _DeleteAccountPageState extends State<DeleteAccountPage> {
);
} catch (e, s) {
Logger("DeleteAccount").severe("failed to delete", e, s);
- await showGenericErrorDialog(context: context, error: e);
+ await showGenericErrorBottomSheet(context: context, error: e);
}
}
}
diff --git a/mobile/apps/photos/lib/ui/account/login_page.dart b/mobile/apps/photos/lib/ui/account/login_page.dart
index ca177bd8da..15fa562547 100644
--- a/mobile/apps/photos/lib/ui/account/login_page.dart
+++ b/mobile/apps/photos/lib/ui/account/login_page.dart
@@ -114,15 +114,11 @@ class _LoginPageState extends State<LoginPage> {
autoFocus: true,
isRequired: true,
onChange: _onEmailChanged,
- message: _showValidationMessage
- ? (_emailIsValid
- ? AppLocalizations.of(context).validEmailAddress
- : AppLocalizations.of(context).invalidEmailAddress)
+ message: _showValidationMessage && !_emailIsValid
+ ? AppLocalizations.of(context).invalidEmailAddress
: null,
- messageType: _showValidationMessage
- ? (_emailIsValid
- ? TextInputMessageType.success
- : TextInputMessageType.alert)
+ messageType: _showValidationMessage && !_emailIsValid
+ ? TextInputMessageType.alert
: TextInputMessageType.guide,
),
],
diff --git a/mobile/apps/photos/lib/ui/account/passkey_page.dart b/mobile/apps/photos/lib/ui/account/passkey_page.dart
index e2cc9c3fc4..fefa59691d 100644
--- a/mobile/apps/photos/lib/ui/account/passkey_page.dart
+++ b/mobile/apps/photos/lib/ui/account/passkey_page.dart
@@ -15,6 +15,7 @@ import "package:photos/theme/colors.dart";
import "package:photos/theme/ente_theme.dart";
import "package:photos/theme/text_style.dart";
import "package:photos/ui/account/two_factor_authentication_page.dart";
+import "package:photos/ui/components/alert_bottom_sheet.dart";
import "package:photos/ui/components/buttons/button_widget_v2.dart";
import "package:photos/ui/notification/toast.dart";
import "package:photos/utils/dialog_util.dart";
@@ -72,16 +73,17 @@ class _PasskeyPageState extends State<PasskeyPage> {
showToast(context, context.l10n.passKeyPendingVerification);
return;
} on PassKeySessionExpiredError {
- await showErrorDialog(
+ await showAlertBottomSheet(
context,
- context.l10n.loginSessionExpired,
- context.l10n.loginSessionExpiredDetails,
+ title: context.l10n.loginSessionExpired,
+ message: context.l10n.loginSessionExpiredDetails,
+ assetPath: 'assets/warning-green.png',
);
Navigator.of(context).pop();
return;
} catch (e, s) {
_logger.severe("failed to check status", e, s);
- showGenericErrorDialog(context: context, error: e).ignore();
+ showGenericErrorBottomSheet(context: context, error: e).ignore();
return;
}
await UserService.instance.onPassKeyVerified(context, response);
@@ -127,7 +129,7 @@ class _PasskeyPageState extends State<PasskeyPage> {
}
} catch (e, s) {
_logger.severe('passKey: failed to handle deeplink', e, s);
- showGenericErrorDialog(context: context, error: e).ignore();
+ showGenericErrorBottomSheet(context: context, error: e).ignore();
}
}
@@ -199,7 +201,8 @@ class _PasskeyPageState extends State<PasskeyPage> {
await checkStatus();
} catch (e) {
debugPrint('failed to check status $e');
- showGenericErrorDialog(context: context, error: e).ignore();
+ showGenericErrorBottomSheet(context: context, error: e)
+ .ignore();
}
},
),
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 9c1aa90e88..bda9f3f8f5 100644
--- a/mobile/apps/photos/lib/ui/account/password_entry_page.dart
+++ b/mobile/apps/photos/lib/ui/account/password_entry_page.dart
@@ -17,6 +17,7 @@ import "package:photos/theme/ente_theme.dart";
import "package:photos/theme/text_style.dart";
import 'package:photos/ui/account/recovery_key_page.dart';
import 'package:photos/ui/common/web_page.dart';
+import "package:photos/ui/components/alert_bottom_sheet.dart";
import "package:photos/ui/components/buttons/button_widget_v2.dart";
import "package:photos/ui/components/models/button_type.dart";
import "package:photos/ui/components/models/text_input_type_v2.dart";
@@ -352,7 +353,7 @@ class _PasswordEntryPageState extends State<PasswordEntryPage> {
} catch (e, s) {
_logger.severe(e, s);
await dialog.hide();
- await showGenericErrorDialog(context: context, error: e);
+ await showGenericErrorBottomSheet(context: context, error: e);
}
}
@@ -410,7 +411,7 @@ class _PasswordEntryPageState extends State<PasswordEntryPage> {
} catch (e, s) {
_logger.severe(e, s);
await dialog.hide();
- await showGenericErrorDialog(context: context, error: e);
+ await showGenericErrorBottomSheet(context: context, error: e);
}
}
@@ -429,14 +430,15 @@ class _PasswordEntryPageState extends State<PasswordEntryPage> {
await dialog.hide();
if (e is UnsupportedError) {
// ignore: unawaited_futures
- showErrorDialog(
+ showAlertBottomSheet(
context,
- AppLocalizations.of(context).insecureDevice,
- AppLocalizations.of(context)
+ title: AppLocalizations.of(context).insecureDevice,
+ message: AppLocalizations.of(context)
.sorryWeCouldNotGenerateSecureKeysOnThisDevicennplease,
+ assetPath: 'assets/warning-green.png',
);
} else {
- await showGenericErrorDialog(context: context, error: e);
+ await showGenericErrorBottomSheet(context: context, error: e);
}
}
}
diff --git a/mobile/apps/photos/lib/ui/account/recovery_page.dart b/mobile/apps/photos/lib/ui/account/recovery_page.dart
index 88b67f7ff2..433c790450 100644
--- a/mobile/apps/photos/lib/ui/account/recovery_page.dart
+++ b/mobile/apps/photos/lib/ui/account/recovery_page.dart
@@ -3,6 +3,7 @@ import 'package:photos/core/configuration.dart';
import "package:photos/generated/l10n.dart";
import "package:photos/theme/ente_theme.dart";
import 'package:photos/ui/account/password_entry_page.dart';
+import "package:photos/ui/components/alert_bottom_sheet.dart";
import "package:photos/ui/components/buttons/button_widget_v2.dart";
import "package:photos/ui/components/text_input_widget_v2.dart";
import 'package:photos/ui/notification/toast.dart';
@@ -85,10 +86,12 @@ class _RecoveryPageState extends State<RecoveryPage> {
buttonSize: ButtonSizeV2.small,
onTap: () async {
// ignore: unawaited_futures
- showErrorDialog(
+ showAlertBottomSheet(
context,
- AppLocalizations.of(context).sorry,
- AppLocalizations.of(context).noRecoveryKeyNoDecryption,
+ title: AppLocalizations.of(context).sorry,
+ message:
+ AppLocalizations.of(context).noRecoveryKeyNoDecryption,
+ assetPath: 'assets/warning-green.png',
);
},
),
@@ -132,10 +135,11 @@ class _RecoveryPageState extends State<RecoveryPage> {
errMessage = '$errMessage : ${e.message}';
}
// ignore: unawaited_futures
- showErrorDialog(
+ showAlertBottomSheet(
context,
- AppLocalizations.of(context).incorrectRecoveryKeyTitle,
- errMessage,
+ title: AppLocalizations.of(context).incorrectRecoveryKeyTitle,
+ message: errMessage,
+ assetPath: 'assets/warning-green.png',
);
}
}
diff --git a/mobile/apps/photos/lib/ui/account/request_pwd_verification_page.dart b/mobile/apps/photos/lib/ui/account/request_pwd_verification_page.dart
index c1be9def54..be0f0ff497 100644
--- a/mobile/apps/photos/lib/ui/account/request_pwd_verification_page.dart
+++ b/mobile/apps/photos/lib/ui/account/request_pwd_verification_page.dart
@@ -7,6 +7,7 @@ import "package:logging/logging.dart";
import 'package:photos/core/configuration.dart';
import "package:photos/l10n/l10n.dart";
import "package:photos/theme/ente_theme.dart";
+import "package:photos/ui/components/alert_bottom_sheet.dart";
import "package:photos/ui/components/buttons/button_widget_v2.dart";
import "package:photos/utils/dialog_util.dart";
@@ -113,10 +114,11 @@ class _RequestPasswordVerificationPageState
widget.onPasswordError!();
} else {
// ignore: unawaited_futures
- showErrorDialog(
+ showAlertBottomSheet(
context,
- context.l10n.incorrectPasswordTitle,
- context.l10n.pleaseTryAgain,
+ title: context.l10n.incorrectPasswordTitle,
+ message: context.l10n.pleaseTryAgain,
+ assetPath: 'assets/warning-green.png',
);
}
}
diff --git a/mobile/apps/photos/lib/ui/account/sessions_page.dart b/mobile/apps/photos/lib/ui/account/sessions_page.dart
index ab8ec7ac7f..be057b243f 100644
--- a/mobile/apps/photos/lib/ui/account/sessions_page.dart
+++ b/mobile/apps/photos/lib/ui/account/sessions_page.dart
@@ -8,6 +8,7 @@ import "package:photos/generated/l10n.dart";
import 'package:photos/services/account/user_service.dart';
import "package:photos/theme/ente_theme.dart";
import 'package:photos/ui/common/loading_widget.dart';
+import "package:photos/ui/components/alert_bottom_sheet.dart";
import 'package:photos/ui/notification/toast.dart';
import 'package:photos/utils/dialog_util.dart';
@@ -129,10 +130,11 @@ class _SessionsPageState extends State<SessionsPage> {
await dialog.hide();
_logger.severe('failed to terminate');
// ignore: unawaited_futures
- showErrorDialog(
+ showAlertBottomSheet(
context,
- AppLocalizations.of(context).oops,
- AppLocalizations.of(context).somethingWentWrongPleaseTryAgain,
+ title: AppLocalizations.of(context).oops,
+ message: AppLocalizations.of(context).somethingWentWrongPleaseTryAgain,
+ assetPath: 'assets/warning-green.png',
);
}
}
diff --git a/mobile/apps/photos/lib/ui/account/two_factor_recovery_page.dart b/mobile/apps/photos/lib/ui/account/two_factor_recovery_page.dart
index fb9f4c8054..3ba3b85d52 100644
--- a/mobile/apps/photos/lib/ui/account/two_factor_recovery_page.dart
+++ b/mobile/apps/photos/lib/ui/account/two_factor_recovery_page.dart
@@ -5,9 +5,9 @@ import 'package:photos/services/account/user_service.dart';
import "package:photos/theme/colors.dart";
import "package:photos/theme/ente_theme.dart";
import "package:photos/theme/text_style.dart";
+import "package:photos/ui/components/alert_bottom_sheet.dart";
import "package:photos/ui/components/buttons/button_widget_v2.dart";
import "package:photos/ui/components/text_input_widget_v2.dart";
-import 'package:photos/utils/dialog_util.dart';
class TwoFactorRecoveryPage extends StatefulWidget {
final String sessionID;
@@ -124,12 +124,13 @@ class _TwoFactorRecoveryPageState extends State<TwoFactorRecoveryPage> {
buttonSize: ButtonSizeV2.small,
onTap: () async {
// ignore: unawaited_futures
- showErrorDialog(
+ showAlertBottomSheet(
context,
- AppLocalizations.of(context).contactSupport,
- AppLocalizations.of(context).dropSupportEmail(
+ title: AppLocalizations.of(context).contactSupport,
+ message: AppLocalizations.of(context).dropSupportEmail(
supportEmail: "[email protected]",
),
+ assetPath: 'assets/warning-green.png',
);
},
),
diff --git a/mobile/apps/photos/lib/ui/account/verify_recovery_page.dart b/mobile/apps/photos/lib/ui/account/verify_recovery_page.dart
index e637781ed7..6cee39dfb8 100644
--- a/mobile/apps/photos/lib/ui/account/verify_recovery_page.dart
+++ b/mobile/apps/photos/lib/ui/account/verify_recovery_page.dart
@@ -14,6 +14,7 @@ import 'package:photos/services/local_authentication_service.dart';
import "package:photos/theme/ente_theme.dart";
import 'package:photos/ui/account/recovery_key_page.dart';
import 'package:photos/ui/common/gradient_button.dart';
+import "package:photos/ui/components/alert_bottom_sheet.dart";
import 'package:photos/ui/components/buttons/button_widget.dart';
import 'package:photos/utils/dialog_util.dart';
@@ -46,24 +47,25 @@ class _VerifyRecoveryPageState extends State<VerifyRecoveryPage> {
} catch (e) {
await dialog.hide();
if (e is DioException && e.type == DioExceptionType.connectionError) {
- await showErrorDialog(
+ await showAlertBottomSheet(
context,
- AppLocalizations.of(context).noInternetConnection,
- AppLocalizations.of(context)
+ title: AppLocalizations.of(context).noInternetConnection,
+ message: AppLocalizations.of(context)
.pleaseCheckYourInternetConnectionAndTryAgain,
+ assetPath: 'assets/warning-green.png',
);
} else {
- await showGenericErrorDialog(context: context, error: e);
+ await showGenericErrorBottomSheet(context: context, error: e);
}
return;
}
Bus.instance.fire(NotificationEvent());
await dialog.hide();
- // todo: change this as per figma once the component is ready
- await showErrorDialog(
+ await showAlertBottomSheet(
context,
- AppLocalizations.of(context).recoveryKeyVerified,
- AppLocalizations.of(context).recoveryKeySuccessBody,
+ title: AppLocalizations.of(context).recoveryKeyVerified,
+ message: AppLocalizations.of(context).recoveryKeySuccessBody,
+ assetPath: 'assets/warning-green.png',
);
Navigator.of(context).pop();
} else {
@@ -112,7 +114,7 @@ class _VerifyRecoveryPageState extends State<VerifyRecoveryPage> {
),
);
} catch (e) {
- await showGenericErrorDialog(context: context, error: e);
+ await showGenericErrorBottomSheet(context: context, error: e);
return;
}
}