Jelajahi Sumber

Merge strings

vishnukvmd 2 tahun lalu
induk
melakukan
d0bd6b19de

+ 2 - 4
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 <warning>account-deletion@ente.io</warning> 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"),

+ 5 - 17
lib/generated/l10n.dart

@@ -290,24 +290,12 @@ class S {
     );
   }
 
-  /// `Please send an email to`
-  String get pleaseSendAnEmailTo {
+  /// `Please send an email to <warning>account-deletion@ente.io</warning> 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 <warning>account-deletion@ente.io</warning> from your registered email address.',
+      name: 'deleteEmailRequest',
+      desc: '',
       args: [],
     );
   }

+ 1 - 8
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 <warning>account-deletion@ente.io</warning> from your registered email address.",
   "ok": "Ok",
   "createAccount": "Create account",
   "createNewAccount": "Create new account",

+ 12 - 22
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<DeleteAccountPage> {
           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<DeleteAccountPage> {
           color: Colors.red,
         ),
       ),
-      content: RichText(
-        text: TextSpan(
-          children: [
-            TextSpan(
-              text: S.of(context).pleaseSendAnEmailTo,
-            ),
-            TextSpan(
-              text: "account-deletion@ente.io",
-              style: TextStyle(
-                color: Colors.orange[300],
-              ),
-            ),
-            TextSpan(
-              text:
-                  " ${S.of(context).fromYourRegisteredEmailAddress}\n\n${S.of(context).deleteRequestSLAText}",
+      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],
             ),
-          ],
-          style: TextStyle(
-            color: Theme.of(context).colorScheme.onSurface,
-            height: 1.5,
-            fontSize: 16,
           ),
-        ),
+        },
       ),
       actions: [
         TextButton(

+ 16 - 0
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:

+ 1 - 0
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