This commit is contained in:
Kima 2024-04-21 15:32:06 +02:00
parent 50cd0807bb
commit 88d375faeb

View File

@ -34,52 +34,52 @@ class MenuCalendarSync extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return PanelButton( return PanelButton(
onPressed: () async { onPressed: () async {
if (!Provider.of<PlusProvider>(context, listen: false) // if (!Provider.of<PlusProvider>(context, listen: false)
.hasScope(PremiumScopes.calendarSync)) { // .hasScope(PremiumScopes.calendarSync)) {
return PlusLockedFeaturePopup.show( // return PlusLockedFeaturePopup.show(
context: context, feature: PremiumFeature.calendarSync); // context: context, feature: PremiumFeature.calendarSync);
} // }
Navigator.of(context, rootNavigator: true).push(CupertinoPageRoute( // Navigator.of(context, rootNavigator: true).push(CupertinoPageRoute(
builder: (context) => const CalendarSyncScreen())); // builder: (context) => const CalendarSyncScreen()));
// showDialog( showDialog(
// context: context, context: context,
// builder: (context) => AlertDialog( builder: (context) => AlertDialog(
// title: const Text("Figyelem!"), title: const Text("Figyelem!"),
// content: const Text( 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."), "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: [ actions: [
// TextButton( TextButton(
// child: const Text( child: const Text(
// "Vissza", "Vissza",
// style: TextStyle(fontWeight: FontWeight.w500), style: TextStyle(fontWeight: FontWeight.w500),
// ), ),
// onPressed: () { onPressed: () {
// Navigator.of(context).pop(); Navigator.of(context).pop();
// }, },
// ), ),
// TextButton( TextButton(
// child: const Text( child: const Text(
// "Tovább", "Tovább",
// style: TextStyle(fontWeight: FontWeight.w500), style: TextStyle(fontWeight: FontWeight.w500),
// ), ),
// onPressed: () { onPressed: () {
// Navigator.of(context).pop(); Navigator.of(context).pop();
// if (!Provider.of<PlusProvider>(context, listen: false) if (!Provider.of<PlusProvider>(context, listen: false)
// .hasScope(PremiumScopes.calendarSync)) { .hasScope(PremiumScopes.calendarSync)) {
// return PlusLockedFeaturePopup.show( return PlusLockedFeaturePopup.show(
// context: context, feature: PremiumFeature.calendarSync); context: context, feature: PremiumFeature.calendarSync);
// } }
// Navigator.of(context, rootNavigator: true).push( Navigator.of(context, rootNavigator: true).push(
// CupertinoPageRoute( CupertinoPageRoute(
// builder: (context) => const CalendarSyncScreen())); builder: (context) => const CalendarSyncScreen()));
// }, },
// ), ),
// ], ],
// ), ),
// ); );
}, },
title: Text( title: Text(
"calendar_sync".i18n, "calendar_sync".i18n,