service status button updates (#1388)

* service status button updates * small fix * update wording

Matthew Fosse committed Apr 15, 2024 at 15:45 UTC fb9534a0e929ecbd61a52d1294f6e5aef05285e6
29 files changed +86 -6
lib/src/screens/dashboard/dashboard_page.dart
+4 -4
@@ -106,10 +106,10 @@ class _DashboardPageView extends BasePage {
106 Widget leading(BuildContext context) {
107 return Observer(
108 builder: (context) {
109 - if (dashboardViewModel.isEnabledBulletinAction) {
110 - return ServicesUpdatesWidget(dashboardViewModel.getServicesStatus());
111 - }
112 - return const SizedBox();
109 + return ServicesUpdatesWidget(
110 + dashboardViewModel.getServicesStatus(),
111 + enabled: dashboardViewModel.isEnabledBulletinAction,
112 + );
113 },
114 );
115 }
lib/src/screens/dashboard/desktop_widgets/desktop_sidebar_wrapper.dart
+4 -1
@@ -107,7 +107,10 @@ class DesktopSidebarWrapper extends BasePage {
107 : unselectedIconPath,
108 ),
109 SideMenuItem(
110 - widget: ServicesUpdatesWidget(dashboardViewModel.getServicesStatus()),
110 + widget: ServicesUpdatesWidget(
111 + dashboardViewModel.getServicesStatus(),
112 + enabled: dashboardViewModel.isEnabledBulletinAction,
113 + ),
114 isSelected: desktopSidebarViewModel.currentPage == SidebarItem.status,
115 onTap: () {},
116 ),
lib/src/widgets/services_updates_widget.dart
+26 -1
@@ -1,10 +1,13 @@
1 import 'package:cake_wallet/di.dart';
2 import 'package:cake_wallet/entities/preferences_key.dart';
3 import 'package:cake_wallet/entities/service_status.dart';
4 +import 'package:cake_wallet/generated/i18n.dart';
5 +import 'package:cake_wallet/src/widgets/alert_with_one_action.dart';
6 import 'package:cake_wallet/src/widgets/primary_button.dart';
7 import 'package:cake_wallet/src/widgets/service_status_tile.dart';
8 import 'package:cake_wallet/themes/extensions/dashboard_page_theme.dart';
9 import 'package:cake_wallet/themes/extensions/wallet_list_theme.dart';
10 +import 'package:cake_wallet/utils/show_pop_up.dart';
11 import 'package:flutter/material.dart';
12 import 'package:flutter_svg/flutter_svg.dart';
13 import 'package:shared_preferences/shared_preferences.dart';
@@ -12,8 +15,9 @@ import 'package:url_launcher/url_launcher.dart';
15
16 class ServicesUpdatesWidget extends StatefulWidget {
17 final Future<ServicesResponse> servicesResponse;
18 + final bool enabled;
19
16 - const ServicesUpdatesWidget(this.servicesResponse, {super.key});
20 + const ServicesUpdatesWidget(this.servicesResponse, {super.key, required this.enabled});
21
22 @override
23 State<ServicesUpdatesWidget> createState() => _ServicesUpdatesWidgetState();
@@ -24,6 +28,27 @@ class _ServicesUpdatesWidgetState extends State<ServicesUpdatesWidget> {
28
29 @override
30 Widget build(BuildContext context) {
31 + if (!widget.enabled) {
32 + return InkWell(
33 + onTap: () async {
34 + await showPopUp<void>(
35 + context: context,
36 + builder: (BuildContext context) {
37 + return AlertWithOneAction(
38 + alertTitle: S.current.service_health_disabled,
39 + alertContent: S.current.service_health_disabled_message,
40 + buttonText: S.current.ok,
41 + buttonAction: () => Navigator.of(context).pop(),
42 + );
43 + });
44 + },
45 + child: SvgPicture.asset(
46 + "assets/images/notification_icon.svg",
47 + color: Theme.of(context).extension<DashboardPageTheme>()!.pageTitleTextColor,
48 + width: 30,
49 + ),
50 + );
51 + }
52 return Padding(
53 padding: const EdgeInsets.all(8.0),
54 child: FutureBuilder<ServicesResponse>(
res/values/strings_ar.arb
+2
@@ -583,6 +583,8 @@
583 "send_your_wallet": "محفظتك",
584 "sending": "يتم الإرسال",
585 "sent": "تم الأرسال",
586 + "service_health_disabled": "تم تعطيل نشرة صحة الخدمة",
587 + "service_health_disabled_message": "هذه هي صفحة نشرة صحة الخدمة ، يمكنك تمكين هذه الصفحة ضمن الإعدادات -> الخصوصية",
588 "settings": "إعدادات",
589 "settings_all": "الكل",
590 "settings_allow_biometrical_authentication": "السماح بالمصادقة البيومترية",
res/values/strings_bg.arb
+2
@@ -583,6 +583,8 @@
583 "send_your_wallet": "Вашият портфейл",
584 "sending": "Изпращане",
585 "sent": "Изпратени",
586 + "service_health_disabled": "Service Health Bulletin е деактивиран",
587 + "service_health_disabled_message": "Това е страницата на Bulletin на Service Health, можете да активирате тази страница в Настройки -> Поверителност",
588 "settings": "Настройки",
589 "settings_all": "Всичко",
590 "settings_allow_biometrical_authentication": "Позволяване на биометрично удостоверяване.",
res/values/strings_cs.arb
+2
@@ -583,6 +583,8 @@
583 "send_your_wallet": "Vaše peněženka",
584 "sending": "Odesílání",
585 "sent": "Odesláno",
586 + "service_health_disabled": "Bulletin zdraví služeb je deaktivován",
587 + "service_health_disabled_message": "Toto je stránka Bulletin Service Health Bulletin, můžete tuto stránku povolit v rámci nastavení -> Ochrana osobních údajů",
588 "settings": "Nastavení",
589 "settings_all": "VŠE",
590 "settings_allow_biometrical_authentication": "Povolit biometrické ověření",
res/values/strings_de.arb
+2
@@ -584,6 +584,8 @@
584 "send_your_wallet": "Ihre Wallet",
585 "sending": "Senden",
586 "sent": "Versendet",
587 + "service_health_disabled": "Service Health Bulletin ist behindert",
588 + "service_health_disabled_message": "Dies ist die Seite \"Service Health Bulletin\", können Sie diese Seite unter Einstellungen -> Privatsphäre aktivieren",
589 "settings": "Einstellungen",
590 "settings_all": "ALLE",
591 "settings_allow_biometrical_authentication": "Biometrische Authentifizierung zulassen",
res/values/strings_en.arb
+2
@@ -583,6 +583,8 @@
583 "send_your_wallet": "Your wallet",
584 "sending": "Sending",
585 "sent": "Sent",
586 + "service_health_disabled": "Service Health Bulletin is disabled",
587 + "service_health_disabled_message": "This is the service health bulletin page, you can enable this page under Settings -> Privacy",
588 "settings": "Settings",
589 "settings_all": "ALL",
590 "settings_allow_biometrical_authentication": "Allow biometrical authentication",
res/values/strings_es.arb
+2
@@ -584,6 +584,8 @@
584 "send_your_wallet": "Tu billetera",
585 "sending": "Enviando",
586 "sent": "Expedido",
587 + "service_health_disabled": "El boletín de salud del servicio está deshabilitado",
588 + "service_health_disabled_message": "Esta es la página del Boletín de Salud del Servicio, puede habilitar esta página en Configuración -> Privacidad",
589 "settings": "Configuraciones",
590 "settings_all": "TODOS",
591 "settings_allow_biometrical_authentication": "Permitir autenticación biométrica",
res/values/strings_fr.arb
+2
@@ -583,6 +583,8 @@
583 "send_your_wallet": "Votre portefeuille (wallet)",
584 "sending": "Envoi",
585 "sent": "Envoyés",
586 + "service_health_disabled": "Le bulletin de santé du service est handicapé",
587 + "service_health_disabled_message": "Ceci est la page du Bulletin de santé du service, vous pouvez activer cette page sous Paramètres -> Confidentialité",
588 "settings": "Paramètres",
589 "settings_all": "TOUT",
590 "settings_allow_biometrical_authentication": "Autoriser l'authentification biométrique",
res/values/strings_ha.arb
+2
@@ -585,6 +585,8 @@
585 "send_your_wallet": "Walat ɗin ku",
586 "sending": "Aika",
587 "sent": "Aika",
588 + "service_health_disabled": "Ba a kashe Bayar da Kiwon Lafiya",
589 + "service_health_disabled_message": "Wannan shafin yanar gizo mai kula da sabis ne, zaka iya kunna wannan shafin a karkashin saiti -> Sirri",
590 "settings": "Saiti",
591 "settings_all": "DUK",
592 "settings_allow_biometrical_authentication": "Bada izinin tantance sawun yatsa",
res/values/strings_hi.arb
+2
@@ -585,6 +585,8 @@
585 "send_your_wallet": "आपका बटुआ",
586 "sending": "भेजना",
587 "sent": "भेज दिया",
588 + "service_health_disabled": "सेवा स्वास्थ्य बुलेटिन अक्षम है",
589 + "service_health_disabled_message": "यह सेवा स्वास्थ्य बुलेटिन पृष्ठ है, आप इस पृष्ठ को सेटिंग्स के तहत सक्षम कर सकते हैं -> गोपनीयता",
590 "settings": "समायोजन",
591 "settings_all": "सब",
592 "settings_allow_biometrical_authentication": "बायोमेट्रिक प्रमाणीकरण की अनुमति दें",
res/values/strings_hr.arb
+2
@@ -583,6 +583,8 @@
583 "send_your_wallet": "Tvoj novčanik",
584 "sending": "Slanje",
585 "sent": "Poslano",
586 + "service_health_disabled": "Zdravstveni bilten usluge je onemogućen",
587 + "service_health_disabled_message": "Ovo je stranica zdravstvenog biltena o usluzi, možete omogućiti ovu stranicu pod postavkama -> privatnost",
588 "settings": "Postavke",
589 "settings_all": "SVE",
590 "settings_allow_biometrical_authentication": "Dopusti biometrijsku autentifikaciju",
res/values/strings_id.arb
+2
@@ -586,6 +586,8 @@
586 "send_your_wallet": "Dompetmu",
587 "sending": "Mengirim",
588 "sent": "Dikirim",
589 + "service_health_disabled": "Buletin Kesehatan Layanan dinonaktifkan",
590 + "service_health_disabled_message": "Ini adalah halaman Buletin Kesehatan Layanan, Anda dapat mengaktifkan halaman ini di bawah Pengaturan -> Privasi",
591 "settings": "Pengaturan",
592 "settings_all": "SEMUA",
593 "settings_allow_biometrical_authentication": "Izinkan otentikasi biometrik",
res/values/strings_it.arb
+2
@@ -585,6 +585,8 @@
585 "send_your_wallet": "Il tuo portafoglio",
586 "sending": "Invio",
587 "sent": "Inviato",
588 + "service_health_disabled": "Il Bollettino sanitario di servizio è disabilitato",
589 + "service_health_disabled_message": "Questa è la pagina del Bollettino sanitario del servizio, è possibile abilitare questa pagina in Impostazioni -> Privacy",
590 "settings": "Impostazioni",
591 "settings_all": "TUTTO",
592 "settings_allow_biometrical_authentication": "Consenti autenticazione biometrica",
res/values/strings_ja.arb
+2
@@ -584,6 +584,8 @@
584 "send_your_wallet": "あなたの財布",
585 "sending": "送信",
586 "sent": "送信済み",
587 + "service_health_disabled": "サービスヘルス速報は無効です",
588 + "service_health_disabled_message": "これはService Health Bulletinページです。設定の下でこのページを有効にすることができます - >プライバシー",
589 "settings": "設定",
590 "settings_all": "すべて",
591 "settings_allow_biometrical_authentication": "生体認証を許可する",
res/values/strings_ko.arb
+2
@@ -584,6 +584,8 @@
584 "send_your_wallet": "지갑",
585 "sending": "배상",
586 "sent": "보냄",
587 + "service_health_disabled": "서비스 건강 게시판이 장애가되었습니다",
588 + "service_health_disabled_message": "이것은 서비스 건강 게시판 페이지입니다. 설정 에서이 페이지를 활성화 할 수 있습니다 -> 개인 정보",
589 "settings": "설정",
590 "settings_all": "모든",
591 "settings_allow_biometrical_authentication": "생체 인증 허용",
res/values/strings_my.arb
+2
@@ -583,6 +583,8 @@
583 "send_your_wallet": "သင့်ပိုက်ဆံအိတ်",
584 "sending": "ပေးပို့ခြင်း။",
585 "sent": "ပို့လိုက်ပါတယ်။",
586 + "service_health_disabled": "ဝန်ဆောင်မှုကျန်းမာရေးစာစောင်အားပိတ်ထားသည်",
587 + "service_health_disabled_message": "ဤသည်မှာ 0 န်ဆောင်မှုကျန်းမာရေးစာစောင်စာမျက်နှာတွင်ဤစာမျက်နှာကို Settings အောက်တွင်ဖွင့်ထားနိုင်သည်",
588 "settings": "ဆက်တင်များ",
589 "settings_all": "အားလုံး",
590 "settings_allow_biometrical_authentication": "ဇီဝဗေဒဆိုင်ရာ အထောက်အထားစိစစ်ခြင်းကို ခွင့်ပြုပါ။",
res/values/strings_nl.arb
+2
@@ -583,6 +583,8 @@
583 "send_your_wallet": "Uw portemonnee",
584 "sending": "Bezig met verzenden",
585 "sent": "Verzonden",
586 + "service_health_disabled": "Service Health Bulletin is uitgeschakeld",
587 + "service_health_disabled_message": "Dit is de Service Health Bulletin -pagina, u kunt deze pagina instellingen inschakelen -> Privacy",
588 "settings": "Instellingen",
589 "settings_all": "ALLE",
590 "settings_allow_biometrical_authentication": "Biometrische authenticatie toestaan",
res/values/strings_pl.arb
+2
@@ -583,6 +583,8 @@
583 "send_your_wallet": "Twój portfel",
584 "sending": "Wysyłanie",
585 "sent": "Wysłano",
586 + "service_health_disabled": "Biuletyn zdrowia usług jest wyłączony",
587 + "service_health_disabled_message": "To jest strona Biuletynu Zdrowie Service, możesz włączyć tę stronę w Ustawieniach -> Prywatność",
588 "settings": "Ustawienia",
589 "settings_all": "Wszystkie",
590 "settings_allow_biometrical_authentication": "Zezwalaj na uwierzytelnianie biometryczne",
res/values/strings_pt.arb
+2
@@ -585,6 +585,8 @@
585 "send_your_wallet": "Sua carteira",
586 "sending": "Enviando",
587 "sent": "Enviada",
588 + "service_health_disabled": "O Boletim de Saúde de Serviço está desativado",
589 + "service_health_disabled_message": "Esta é a página do Boletim de Saúde de Serviço, você pode ativar esta página em Configurações -> Privacidade",
590 "settings": "Configurações",
591 "settings_all": "Tudo",
592 "settings_allow_biometrical_authentication": "Permitir autenticação biométrica",
res/values/strings_ru.arb
+2
@@ -584,6 +584,8 @@
584 "send_your_wallet": "Ваш кошелёк",
585 "sending": "Отправка",
586 "sent": "Отправленные",
587 + "service_health_disabled": "Бюллетень для здоровья обслуживания инвалид",
588 + "service_health_disabled_message": "Это страница бюллетени обслуживания услуг, вы можете включить эту страницу в соответствии с настройками -> Конфиденциальность",
589 "settings": "Настройки",
590 "settings_all": "ВСЕ",
591 "settings_allow_biometrical_authentication": "Включить биометрическую аутентификацию",
res/values/strings_th.arb
+2
@@ -583,6 +583,8 @@
583 "send_your_wallet": "กระเป๋าของคุณ",
584 "sending": "กำลังส่ง",
585 "sent": "ส่ง",
586 + "service_health_disabled": "Service Health Bulletin ถูกปิดใช้งาน",
587 + "service_health_disabled_message": "นี่คือหน้า Service Health Bulletin คุณสามารถเปิดใช้งานหน้านี้ภายใต้การตั้งค่า -> ความเป็นส่วนตัว",
588 "settings": "การตั้งค่า",
589 "settings_all": "ทั้งหมด",
590 "settings_allow_biometrical_authentication": "อนุญาตให้ใช้การยืนยันตัวตนทางระบบชีวภาพ",
res/values/strings_tl.arb
+2
@@ -583,6 +583,8 @@
583 "send_your_wallet": "Iyong pitaka",
584 "sending": "Pagpapadala",
585 "sent": "Ipinadala",
586 + "service_health_disabled": "Hindi pinagana ang Bulletin ng Serbisyo sa Kalusugan",
587 + "service_health_disabled_message": "Ito ang pahina ng Bulletin ng Serbisyo ng Bulletin, maaari mong paganahin ang pahinang ito sa ilalim ng Mga Setting -> Pagkapribado",
588 "settings": "Mga setting",
589 "settings_all": "Lahat",
590 "settings_allow_biometrical_authentication": "Payagan ang pagpapatunay ng biometrical",
res/values/strings_tr.arb
+2
@@ -583,6 +583,8 @@
583 "send_your_wallet": "Cüzdanın",
584 "sending": "Gönderiliyor",
585 "sent": "Gönderildi",
586 + "service_health_disabled": "Service Health Bülten devre dışı bırakıldı",
587 + "service_health_disabled_message": "Bu Hizmet Sağlığı Bülten Sayfası, bu sayfayı Ayarlar -> Gizlilik altında etkinleştirebilirsiniz",
588 "settings": "ayarlar",
589 "settings_all": "HEPSİ",
590 "settings_allow_biometrical_authentication": "Biyometrik doğrulamaya izin ver",
res/values/strings_uk.arb
+2
@@ -584,6 +584,8 @@
584 "send_your_wallet": "Ваш гаманець",
585 "sending": "Відправлення",
586 "sent": "Відправлені",
587 + "service_health_disabled": "Вісник охорони здоров'я інвалідів",
588 + "service_health_disabled_message": "Це сторінка бюлетеня Health Service, ви можете включити цю сторінку в налаштуваннях -> конфіденційність",
589 "settings": "Налаштування",
590 "settings_all": "ВСІ",
591 "settings_allow_biometrical_authentication": "Включити біометричну аутентифікацію",
res/values/strings_ur.arb
+2
@@ -585,6 +585,8 @@
585 "send_your_wallet": "آپ کا بٹوہ",
586 "sending": "بھیج رہا ہے۔",
587 "sent": "بھیجا",
588 + "service_health_disabled": "سروس ہیلتھ بلیٹن غیر فعال ہے",
589 + "service_health_disabled_message": "یہ سروس ہیلتھ بلیٹن پیج ہے ، آپ اس صفحے کو ترتیبات کے تحت اہل بنا سکتے ہیں -> رازداری",
590 "settings": "ترتیبات",
591 "settings_all": "تمام",
592 "settings_allow_biometrical_authentication": "بایومیٹریکل تصدیق کی اجازت دیں۔",
res/values/strings_yo.arb
+2
@@ -584,6 +584,8 @@
584 "send_your_wallet": "Àpamọ́wọ́ yín",
585 "sending": "Ó ń ránṣẹ́",
586 "sent": "Owó t'á ti ránṣẹ́",
587 + "service_health_disabled": "IPỌRỌ IWE TI AGBARA TI O LE RẸ",
588 + "service_health_disabled_message": "Eyi ni oju-iwe Iwe itẹlera Iṣẹ Ile-iṣẹ Iṣẹ: O le mu oju-iwe yii ṣiṣẹ labẹ Eto -> Asiri",
589 "settings": "Awọn aseṣe",
590 "settings_all": "Gbogbo",
591 "settings_allow_biometrical_authentication": "Fi àyè gba ìfẹ̀rílàdí biometrical",
res/values/strings_zh.arb
+2
@@ -583,6 +583,8 @@
583 "send_your_wallet": "你的钱包",
584 "sending": "正在发送",
585 "sent": "已发送",
586 + "service_health_disabled": "服务健康公告被禁用",
587 + "service_health_disabled_message": "这是服务健康公告页面,您可以在设置 - >隐私下启用此页面",
588 "settings": "设置",
589 "settings_all": "全部",
590 "settings_allow_biometrical_authentication": "允许生物识别认证",