From 35985fb8d2d6014c8686ec7bdba01b3be392aa5c Mon Sep 17 00:00:00 2001 From: Vishesh Handa Date: Wed, 12 Aug 2020 18:34:12 +0200 Subject: [PATCH] PurchaseScreen: Simplify it and show feature list Instead of showing a list of features which is incomplete we now show just allow them to see the feature list. This however, doesn't show up-coming features. --- assets/langs/en.yaml | 9 +++++ lib/screens/purchase_screen.dart | 65 ++++++++++---------------------- 2 files changed, 29 insertions(+), 45 deletions(-) diff --git a/assets/langs/en.yaml b/assets/langs/en.yaml index 85f88a29..e453cfdf 100644 --- a/assets/langs/en.yaml +++ b/assets/langs/en.yaml @@ -212,3 +212,12 @@ feature: feature_timeline: title: Feature Timeline + +purchase_screen: + title: Pro Version + desc: 'GitJournal is completely open source and is the result of significant development work. It has no venture capital or corporation backing. Your support directly sustains development. + + +Paying a monthly subscription helps you support development and gives you access to +a number of "Pro" only features. We operate on a "pay what you want model". No matter what you pay +you will get access to all the Pro features.' diff --git a/lib/screens/purchase_screen.dart b/lib/screens/purchase_screen.dart index e2314147..6f46d506 100644 --- a/lib/screens/purchase_screen.dart +++ b/lib/screens/purchase_screen.dart @@ -2,7 +2,10 @@ import 'dart:async'; import 'package:flutter/material.dart'; +import 'package:easy_localization/easy_localization.dart'; + import 'package:gitjournal/analytics.dart'; +import 'package:gitjournal/screens/feature_timeline_screen.dart'; import 'package:gitjournal/widgets/purchase_widget.dart'; class PurchaseScreen extends StatelessWidget { @@ -11,7 +14,7 @@ class PurchaseScreen extends StatelessWidget { return WillPopScope( child: Scaffold( appBar: AppBar( - title: const Text('Pro Version'), + title: Text(tr('purchase_screen.title')), ), body: buildBody(context), ), @@ -20,53 +23,25 @@ class PurchaseScreen extends StatelessWidget { } Widget buildBody(BuildContext context) { - // FIXME: This screen needs to be made way way more beautiful - // It's an extrememly important screen - - var features = [ - "Faster feature development", - "Note Tagging", - "Custom Home Screen", - "Note BackLinks", - "Zen Mode", - "Multiple Git Repos (coming soon)", - "Custom settings per folder (coming soon)", - "View and search through your entire Git Log (coming soon)", - "Custom Git commits (coming soon)", - "Note Templates (comming soon)", - "Unlimited Pinned Folders / Queries (coming soon)", - "End-to-End encrypted Git Hosting (coming soon)", - "Maybe even your own custom feature (email me).", - "GitJournal stays Ad free", - ]; - - var body = Column( - mainAxisAlignment: MainAxisAlignment.center, - crossAxisAlignment: CrossAxisAlignment.start, - mainAxisSize: MainAxisSize.min, - children: [ - Text( - 'Support GitJournal by going Pro and additionally get -', - style: Theme.of(context).textTheme.headline6, - ), - const SizedBox(height: 16.0), - for (var f in features) - Column( - children: [ - Text( - "• $f", - style: Theme.of(context).textTheme.bodyText1, - ), - const SizedBox(height: 8.0), - ], - ), - ], - ); Widget w = Column( children: [ - body, - const SizedBox(height: 32.0), + Text( + tr('purchase_screen.desc'), + style: Theme.of(context).textTheme.bodyText2, + ), + const SizedBox(height: 16.0), + OutlineButton( + child: Text(tr("feature_timeline.title")), + onPressed: () { + var route = MaterialPageRoute( + builder: (context) => FeatureTimelineScreen(), + settings: const RouteSettings(name: '/featureTimeline'), + ); + Navigator.of(context).push(route); + }, + ), + const SizedBox(height: 64.0), PurchaseWidget(), ], mainAxisAlignment: MainAxisAlignment.start,