added warning text

This commit is contained in:
Kima 2024-04-21 15:29:59 +02:00
parent c10c17f72f
commit 50cd0807bb

View File

@ -34,44 +34,52 @@ class MenuCalendarSync extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return PanelButton( return PanelButton(
onPressed: () async { onPressed: () async {
showDialog( if (!Provider.of<PlusProvider>(context, listen: false)
context: context, .hasScope(PremiumScopes.calendarSync)) {
builder: (context) => AlertDialog( return PlusLockedFeaturePopup.show(
title: const Text("Figyelem!"), context: context, feature: PremiumFeature.calendarSync);
content: const Text( }
"A naptár szinkronizálás csak azután fog működni, hogy a Google elfogadja az OAuth kérelmünket, addig is szíves türelmeteket kérjük! Amint ez megtörténik, értesíteni fogunk titeket Discord-on, valamint alkalmazáson belüli hírekben is."),
actions: [
TextButton(
child: const Text(
"Vissza",
style: TextStyle(fontWeight: FontWeight.w500),
),
onPressed: () {
Navigator.of(context).pop();
},
),
TextButton(
child: const Text(
"Tovább",
style: TextStyle(fontWeight: FontWeight.w500),
),
onPressed: () {
Navigator.of(context).pop();
if (!Provider.of<PlusProvider>(context, listen: false) Navigator.of(context, rootNavigator: true).push(CupertinoPageRoute(
.hasScope(PremiumScopes.calendarSync)) { builder: (context) => const CalendarSyncScreen()));
return PlusLockedFeaturePopup.show( // showDialog(
context: context, feature: PremiumFeature.calendarSync); // context: context,
} // builder: (context) => AlertDialog(
// title: const Text("Figyelem!"),
// content: const Text(
// "A naptár szinkronizálás csak azután fog működni, hogy a Google elfogadja az OAuth kérelmünket, addig is szíves türelmeteket kérjük! Amint ez megtörténik, értesíteni fogunk titeket Discord-on, valamint alkalmazáson belüli hírekben is."),
// actions: [
// TextButton(
// child: const Text(
// "Vissza",
// style: TextStyle(fontWeight: FontWeight.w500),
// ),
// onPressed: () {
// Navigator.of(context).pop();
// },
// ),
// TextButton(
// child: const Text(
// "Tovább",
// style: TextStyle(fontWeight: FontWeight.w500),
// ),
// onPressed: () {
// Navigator.of(context).pop();
Navigator.of(context, rootNavigator: true).push( // if (!Provider.of<PlusProvider>(context, listen: false)
CupertinoPageRoute( // .hasScope(PremiumScopes.calendarSync)) {
builder: (context) => const CalendarSyncScreen())); // return PlusLockedFeaturePopup.show(
}, // context: context, feature: PremiumFeature.calendarSync);
), // }
],
), // Navigator.of(context, rootNavigator: true).push(
); // CupertinoPageRoute(
// builder: (context) => const CalendarSyncScreen()));
// },
// ),
// ],
// ),
// );
}, },
title: Text( title: Text(
"calendar_sync".i18n, "calendar_sync".i18n,
@ -301,6 +309,12 @@ class CalendarSyncScreenState extends State<CalendarSyncScreen>
), ),
], ],
), ),
const SizedBox(
height: 10.0,
),
const Text(
"A naptár szinkronizálás csak azután fog működni, hogy a Google elfogadja az OAuth kérelmünket, addig is szíves türelmeteket kérjük! Amint ez megtörténik, értesíteni fogunk titeket Discord-on, valamint alkalmazáson belüli hírekben is."),
], ],
), ),