diff --git a/refilc_mobile_ui/lib/plus/components/plan_card.dart b/refilc_mobile_ui/lib/plus/components/plan_card.dart index f590468..f8aba19 100644 --- a/refilc_mobile_ui/lib/plus/components/plan_card.dart +++ b/refilc_mobile_ui/lib/plus/components/plan_card.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import 'package:refilc/models/settings.dart'; +import 'package:refilc_mobile_ui/common/action_button.dart'; import 'package:refilc_plus/providers/plus_provider.dart'; import 'package:refilc_plus/ui/mobile/plus/activation_view/activation_view.dart'; import 'package:refilc_mobile_ui/plus/plus_screen.i18n.dart'; @@ -39,18 +40,18 @@ class PlusPlanCard extends StatelessWidget { Widget build(BuildContext context) { return GestureDetector( onTap: () { - if (!docsAccepted) { - ScaffoldMessenger.of(context).showSnackBar(const SnackBar( - content: Text( - "El kell fogadnod az ÁSZF-et és az Adatkezelési Tájékoztatót!", - style: - TextStyle(color: Colors.black, fontWeight: FontWeight.bold), - ), - backgroundColor: Colors.white, - )); + // if (!docsAccepted) { + // ScaffoldMessenger.of(context).showSnackBar(const SnackBar( + // content: Text( + // "El kell fogadnod az ÁSZF-et és az Adatkezelési Tájékoztatót!", + // style: + // TextStyle(color: Colors.black, fontWeight: FontWeight.bold), + // ), + // backgroundColor: Colors.white, + // )); - return; - } + // return; + // } if (Provider.of(context, listen: false).xFilcId == "none") { @@ -84,9 +85,29 @@ class PlusPlanCard extends StatelessWidget { return; } - Navigator.of(context).push(MaterialPageRoute(builder: (context) { - return PremiumActivationView(product: id); - })); + showDialog( + context: context, + builder: (context) => AlertDialog( + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(12.0)), + title: Text('docs'.i18n), + content: Text('docs_acceptance'.i18n), + actions: [ + ActionButton( + label: "next".i18n, + onTap: () { + // pop dialog + Navigator.of(context).pop(); + // start payment process + Navigator.of(context) + .push(MaterialPageRoute(builder: (context) { + return PremiumActivationView(product: id); + })); + }, + ), + ], + ), + ); }, child: Container( decoration: BoxDecoration( diff --git a/refilc_mobile_ui/lib/plus/plus_screen.dart b/refilc_mobile_ui/lib/plus/plus_screen.dart index a5ca2ff..e2db8b1 100644 --- a/refilc_mobile_ui/lib/plus/plus_screen.dart +++ b/refilc_mobile_ui/lib/plus/plus_screen.dart @@ -420,41 +420,41 @@ class PlusScreenState extends State { ), ), // aszf warning - const SizedBox( - height: 18.0, - ), - Container( - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(16.0), - border: Border.all( - color: Colors.black.withOpacity(0.2), - ), - ), - child: CheckboxListTile( - side: - const BorderSide(color: Colors.black, width: 2.0), - contentPadding: - const EdgeInsets.only(left: 15.0, right: 10.0), - value: docsAccepted, - onChanged: (value) { - setState(() { - docsAccepted = !docsAccepted; - }); - }, - // title: Text( - // 'show_lifetime'.i18n, - // style: const TextStyle( - // color: Colors.black, - // fontWeight: FontWeight.w500, - // ), - // ), - subtitle: const Text( - 'Elfogadod a reFilc előfizetésekkel kapcsolatos Általános Szerződési Feltételeit (elérhető az alábbi link-en: filc.one/pay-terms), valamint Adatkezelési Tájékoztatónkat (elérhető az alábbi link-en: filc.one/pay-privacy)?', - textAlign: TextAlign.start, - style: TextStyle(color: Colors.black), - ), - ), - ), + // const SizedBox( + // height: 18.0, + // ), + // Container( + // decoration: BoxDecoration( + // borderRadius: BorderRadius.circular(16.0), + // border: Border.all( + // color: Colors.black.withOpacity(0.2), + // ), + // ), + // child: CheckboxListTile( + // side: + // const BorderSide(color: Colors.black, width: 2.0), + // contentPadding: + // const EdgeInsets.only(left: 15.0, right: 10.0), + // value: docsAccepted, + // onChanged: (value) { + // setState(() { + // docsAccepted = !docsAccepted; + // }); + // }, + // // title: Text( + // // 'show_lifetime'.i18n, + // // style: const TextStyle( + // // color: Colors.black, + // // fontWeight: FontWeight.w500, + // // ), + // // ), + // subtitle: const Text( + // 'Elfogadod a reFilc előfizetésekkel kapcsolatos Általános Szerződési Feltételeit (elérhető az alábbi link-en: filc.one/pay-terms), valamint Adatkezelési Tájékoztatónkat (elérhető az alábbi link-en: filc.one/pay-privacy)?', + // textAlign: TextAlign.start, + // style: TextStyle(color: Colors.black), + // ), + // ), + // ), // CheckboxListTile(value: false, onChanged: onChanged) // Padding( // padding: const EdgeInsets.symmetric(horizontal: 12.0), diff --git a/refilc_mobile_ui/lib/plus/plus_screen.i18n.dart b/refilc_mobile_ui/lib/plus/plus_screen.i18n.dart index 5c9b29b..902ba64 100644 --- a/refilc_mobile_ui/lib/plus/plus_screen.i18n.dart +++ b/refilc_mobile_ui/lib/plus/plus_screen.i18n.dart @@ -47,13 +47,19 @@ extension SettingsLocalization on String { "rfp_16": "Private leaks and informations about upcoming features", "rfp_17": "Grade exporting", "rfp_18": "Viewing exported grades", + // docs popup + "docs": "Documents", + "docs_acceptance": + "By pressing the \"Next\" button, you accept reFilc's Terms and Conditions for subscriptions (available at the following link: filc.one/pay-terms) and our Privacy Policy (available at the following link: filc.one/pay-privacy).", + "next": "Next", // other "and": " and ", "every": "Every ", "benefit": " benefit", "show_lifetime": "Show Lifetime Plans", "more_soon": "More coming soon...", - "faq_dc": "To redeem your benefits, contact us on Discord in DMs!", + "faq_dc": + "To redeem your Discord-related benefits, contact us on Discord in DMs!", "reactivate": "Reactivate Existing Subscription", }, "hu_hu": { @@ -100,6 +106,11 @@ extension SettingsLocalization on String { "rfp_16": "Privát betekintések és információk közelgő újításokról", "rfp_17": "Jegy exportálás", "rfp_18": "Exportált jegyek megtekintése", + // docs popup + "docs": "Dokumentumok", + "docs_acceptance": + "A \"Tovább\" gombra kattintva elfogadod a reFilc előfizetésekkel kapcsolatos Általános Szerződési Feltételeit (elérhető az alábbi link-en: filc.one/pay-terms), valamint Adatkezelési Tájékoztatónkat (elérhető az alábbi link-en: filc.one/pay-privacy).", + "next": "Tovább", // other "and": " és ", "every": "Minden ", @@ -107,7 +118,7 @@ extension SettingsLocalization on String { "show_lifetime": "Örökre szóló csomagok", "more_soon": "Hamarosan mégtöbb finomság...", "faq_dc": - "Az előnyök beváltásához írj nekünk Discord-on privát üzenetet!", + "A Discord-al kapcsolatos előnyök beváltásához írj nekünk Discord-on privát üzenetet!", "reactivate": "Meglévő előfizetés újraaktiválása", }, "de_de": { @@ -156,6 +167,11 @@ extension SettingsLocalization on String { "rfp_16": "Private Leaks und Informationen über kommende Funktionen", "rfp_17": "Notenexport", "rfp_18": "Anzeigen exportierter Noten", + // docs popup + "docs": "Dokumente", + "docs_acceptance": + "Durch Drücken der Schaltfläche \"Weiter\" akzeptieren Sie die Allgemeinen Geschäftsbedingungen von reFilc für Abonnements (verfügbar unter folgendem Link: filc.one/pay-terms) und unsere Datenschutzrichtlinie (verfügbar unter folgendem Link: filc.one/pay-privacy).", + "next": "Weiter", // other "and": " und ", "every": "Jeder ",