diff --git a/lib/generated/intl/messages_en.dart b/lib/generated/intl/messages_en.dart index fc5aa2113..6bfcf0b45 100644 --- a/lib/generated/intl/messages_en.dart +++ b/lib/generated/intl/messages_en.dart @@ -429,6 +429,8 @@ class MessageLookup extends MessageLookupByLibrary { "deleteAll": MessageLookupByLibrary.simpleMessage("Delete All"), "deleteConfirmDialogBody": MessageLookupByLibrary.simpleMessage( "You are about to permanently delete your account and all its data.\nThis action is irreversible."), + "deleteEmailRequest": MessageLookupByLibrary.simpleMessage( + "Please send an email to account-deletion@ente.io from your registered email address."), "deleteEmptyAlbums": MessageLookupByLibrary.simpleMessage("Delete empty albums"), "deleteEmptyAlbumsWithQuestionMark": @@ -590,8 +592,6 @@ class MessageLookup extends MessageLookupByLibrary { MessageLookupByLibrary.simpleMessage("Free up device space"), "freeUpSpace": MessageLookupByLibrary.simpleMessage("Free up space"), "freeUpSpaceSaving": m20, - "fromYourRegisteredEmailAddress": MessageLookupByLibrary.simpleMessage( - "from your registered email address."), "general": MessageLookupByLibrary.simpleMessage("General"), "generatingEncryptionKeys": MessageLookupByLibrary.simpleMessage( "Generating encryption keys..."), @@ -794,8 +794,6 @@ class MessageLookup extends MessageLookupByLibrary { MessageLookupByLibrary.simpleMessage("Please grant permissions"), "pleaseLoginAgain": MessageLookupByLibrary.simpleMessage("Please login again"), - "pleaseSendAnEmailTo": - MessageLookupByLibrary.simpleMessage("Please send an email to"), "pleaseSendTheLogsTo": m32, "pleaseTryAgain": MessageLookupByLibrary.simpleMessage("Please try again"), diff --git a/lib/generated/l10n.dart b/lib/generated/l10n.dart index d39f76dba..f6c626f51 100644 --- a/lib/generated/l10n.dart +++ b/lib/generated/l10n.dart @@ -290,24 +290,12 @@ class S { ); } - /// `Please send an email to` - String get pleaseSendAnEmailTo { + /// `Please send an email to account-deletion@ente.io from your registered email address.` + String get deleteEmailRequest { return Intl.message( - 'Please send an email to', - name: 'pleaseSendAnEmailTo', - desc: - 'This text is part of the sentence \'Please send an email to email@ente.io from your registered email address.\'', - args: [], - ); - } - - /// `from your registered email address.` - String get fromYourRegisteredEmailAddress { - return Intl.message( - 'from your registered email address.', - name: 'fromYourRegisteredEmailAddress', - desc: - 'This text is part of the sentence \'Please send an email to email@ente.io from your registered email address.\'', + 'Please send an email to account-deletion@ente.io from your registered email address.', + name: 'deleteEmailRequest', + desc: '', args: [], ); } diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index d85713ab3..f7eb1a58c 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -23,14 +23,7 @@ "deleteReason4": "My reason isn’t listed", "sendEmail": "Send email", "deleteRequestSLAText": "Your request will be processed within 72 hours.", - "pleaseSendAnEmailTo": "Please send an email to", - "@pleaseSendAnEmailTo": { - "description": "This text is part of the sentence 'Please send an email to email@ente.io from your registered email address.'" - }, - "fromYourRegisteredEmailAddress": "from your registered email address.", - "@fromYourRegisteredEmailAddress": { - "description": "This text is part of the sentence 'Please send an email to email@ente.io from your registered email address.'" - }, + "deleteEmailRequest": "Please send an email to account-deletion@ente.io from your registered email address.", "ok": "Ok", "createAccount": "Create account", "createNewAccount": "Create new account", diff --git a/lib/ui/account/delete_account_page.dart b/lib/ui/account/delete_account_page.dart index 45220316b..be77f3e82 100644 --- a/lib/ui/account/delete_account_page.dart +++ b/lib/ui/account/delete_account_page.dart @@ -14,6 +14,7 @@ import 'package:photos/utils/crypto_util.dart'; import 'package:photos/utils/dialog_util.dart'; import 'package:photos/utils/email_util.dart'; import "package:photos/utils/toast_util.dart"; +import "package:styled_text/styled_text.dart"; class DeleteAccountPage extends StatefulWidget { const DeleteAccountPage({ @@ -51,7 +52,8 @@ class _DeleteAccountPageState extends State { icon: const Icon(Icons.arrow_back), color: Theme.of(context).iconTheme.color, onPressed: () { - Navigator.of(context).pop(); + // Navigator.of(context).pop(); + _requestEmailForDeletion(context); }, ), ), @@ -280,29 +282,17 @@ class _DeleteAccountPageState extends State { color: Colors.red, ), ), - content: RichText( - text: TextSpan( - children: [ - TextSpan( - text: S.of(context).pleaseSendAnEmailTo, + content: StyledText( + text: + "${S.of(context).deleteEmailRequest}\n\n${S.of(context).deleteRequestSLAText}", + tags: { + 'warning': StyledTextTag( + style: TextStyle( + fontWeight: FontWeight.bold, + color: Colors.orange[300], ), - TextSpan( - text: "account-deletion@ente.io", - style: TextStyle( - color: Colors.orange[300], - ), - ), - TextSpan( - text: - " ${S.of(context).fromYourRegisteredEmailAddress}\n\n${S.of(context).deleteRequestSLAText}", - ), - ], - style: TextStyle( - color: Theme.of(context).colorScheme.onSurface, - height: 1.5, - fontSize: 16, ), - ), + }, ), actions: [ TextButton( diff --git a/pubspec.lock b/pubspec.lock index 03e81eb76..083bfd1a7 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1634,6 +1634,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.0" + styled_text: + dependency: "direct main" + description: + name: styled_text + sha256: f72928d1ebe8cb149e3b34a689cb1ddca696b808187cf40ac3a0bd183dff379c + url: "https://pub.dev" + source: hosted + version: "7.0.0" syncfusion_flutter_core: dependency: "direct main" description: @@ -1984,6 +1992,14 @@ packages: url: "https://pub.dev" source: hosted version: "6.2.2" + xmlstream: + dependency: transitive + description: + name: xmlstream + sha256: "2d10c69a9d5fc46f71798b80ee6db15bc0d5bf560fdbdd264776cbeee0c83631" + url: "https://pub.dev" + source: hosted + version: "1.0.0" yaml: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index dbda46b70..6ad0b2ca9 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -107,6 +107,7 @@ dependencies: sqflite: ^2.0.0+3 sqflite_migration: ^0.3.0 step_progress_indicator: ^1.0.2 + styled_text: ^7.0.0 syncfusion_flutter_core: ^19.2.49 syncfusion_flutter_sliders: ^19.2.49 tflite_flutter: ^0.9.0