From 069846cd5b7b0f52cb143275874e649b4b413aa9 Mon Sep 17 00:00:00 2001 From: eymeric Date: Tue, 23 Jan 2024 20:25:42 +0100 Subject: [PATCH] warning to quit send email --- apps/onyx/lib/l10n/app_ar.arb | 3 ++- apps/onyx/lib/l10n/app_en.arb | 4 ++++ apps/onyx/lib/l10n/app_fr.arb | 3 ++- apps/onyx/lib/l10n/app_ru.arb | 3 ++- .../screens/mails/pages/email_send_page.dart | 22 ++++++++++++++++++- 5 files changed, 31 insertions(+), 4 deletions(-) diff --git a/apps/onyx/lib/l10n/app_ar.arb b/apps/onyx/lib/l10n/app_ar.arb index becd3d35..35ca3d93 100644 --- a/apps/onyx/lib/l10n/app_ar.arb +++ b/apps/onyx/lib/l10n/app_ar.arb @@ -205,5 +205,6 @@ "pleaseSelectOutputFile": "الرجاء تحديد ملف الإخراج", "unableToOpenLink": "من المستحيل فتح الرابط", "chooseLanguage": "اختر اللغة", - "auto": "تلقائي" + "auto": "تلقائي", + "realyQuit": "حقيقة تريد الاستقالة؟" } \ No newline at end of file diff --git a/apps/onyx/lib/l10n/app_en.arb b/apps/onyx/lib/l10n/app_en.arb index 6b7798c3..98d9e677 100644 --- a/apps/onyx/lib/l10n/app_en.arb +++ b/apps/onyx/lib/l10n/app_en.arb @@ -978,5 +978,9 @@ "auto": "Automatic", "@auto": { "description": "Automatic" + }, + "realyQuit": "Do you really want to quit?", + "@realyQuit": { + "description": "Do you really want to quit?" } } \ No newline at end of file diff --git a/apps/onyx/lib/l10n/app_fr.arb b/apps/onyx/lib/l10n/app_fr.arb index 95493132..2b383346 100644 --- a/apps/onyx/lib/l10n/app_fr.arb +++ b/apps/onyx/lib/l10n/app_fr.arb @@ -205,5 +205,6 @@ "pleaseSelectOutputFile": "Veuillez sélectionner un fichier de sortie", "unableToOpenLink": "Impossible d''ouvrir le lien", "chooseLanguage": "Choisir la langue", - "auto": "Automatique" + "auto": "Automatique", + "realyQuit": "Voulez-vous vraiment quitter ?" } \ No newline at end of file diff --git a/apps/onyx/lib/l10n/app_ru.arb b/apps/onyx/lib/l10n/app_ru.arb index c142fc43..5ae8ea74 100644 --- a/apps/onyx/lib/l10n/app_ru.arb +++ b/apps/onyx/lib/l10n/app_ru.arb @@ -206,5 +206,6 @@ "unableToOpenLink": "Не удалось открыть ссылку", "chooseLanguage": "Выберите язык", "auto": "Автоматически", - "unflagedEmail": "Неотмеченное письмо: {subject}" + "unflagedEmail": "Неотмеченное письмо: {subject}", + "realyQuit": "Вы действительно хотите бросить курить?" } \ No newline at end of file diff --git a/apps/onyx/lib/screens/mails/pages/email_send_page.dart b/apps/onyx/lib/screens/mails/pages/email_send_page.dart index 448622db..b362058b 100644 --- a/apps/onyx/lib/screens/mails/pages/email_send_page.dart +++ b/apps/onyx/lib/screens/mails/pages/email_send_page.dart @@ -108,7 +108,27 @@ class MailSendPage extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.center, children: [ InkWell( - onTap: () => Navigator.pop(context), + onTap: () => showDialog( + context: context, + builder: (context) => AlertDialog( + backgroundColor: + Theme.of(context).colorScheme.background, + title: Text(AppLocalizations.of(context).realyQuit), + actions: [ + TextButton( + onPressed: () => Navigator.pop(context), + child: const Text("Non"), + ), + TextButton( + onPressed: () { + Navigator.pop(context); + Navigator.pop(context); + }, + child: const Text("Oui"), + ), + ], + ), + ), child: Icon( Icons.arrow_back_rounded, color: Theme.of(context)