From 3f53197d7a797ab1590a8c1a3081c8a2460013cd Mon Sep 17 00:00:00 2001 From: Neeraj Gupta <254676+ua741@users.noreply.github.com> Date: Wed, 26 Oct 2022 13:06:08 +0530 Subject: [PATCH 1/3] pubspec changes --- pubspec.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.lock b/pubspec.lock index 208ff749d..9264bb72a 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -411,7 +411,7 @@ packages: name: flutter_inappwebview url: "https://pub.dartlang.org" source: hosted - version: "5.4.3+7" + version: "5.7.1" flutter_keyboard_visibility: dependency: transitive description: From e04fe51036a08a7d58ab19d0bc5e324bec951c3e Mon Sep 17 00:00:00 2001 From: Neeraj Gupta <254676+ua741@users.noreply.github.com> Date: Wed, 26 Oct 2022 13:16:36 +0530 Subject: [PATCH 2/3] Fix on ente section title for light theme --- lib/theme/text_style.dart | 12 ++++++---- lib/ui/collections/section_title.dart | 32 +++++++++++++++----------- lib/ui/collections_gallery_widget.dart | 2 +- 3 files changed, 26 insertions(+), 20 deletions(-) diff --git a/lib/theme/text_style.dart b/lib/theme/text_style.dart index 4d7228764..83bde3182 100644 --- a/lib/theme/text_style.dart +++ b/lib/theme/text_style.dart @@ -16,11 +16,7 @@ const TextStyle brandStyleMedium = TextStyle( fontFamily: 'Montserrat', fontSize: 24, ); -const TextStyle brandStyleLarge = TextStyle( - fontWeight: FontWeight.bold, - fontFamily: 'Montserrat', - fontSize: 28, -); + const TextStyle h1 = TextStyle( fontSize: 48, height: 48 / 28, @@ -87,6 +83,8 @@ class EnteTextTheme { final TextStyle miniBold; final TextStyle tiny; final TextStyle tinyBold; + final TextStyle brandSmall; + final TextStyle brandMedium; const EnteTextTheme({ required this.h1, @@ -105,6 +103,8 @@ class EnteTextTheme { required this.miniBold, required this.tiny, required this.tinyBold, + required this.brandSmall, + required this.brandMedium, }); } @@ -129,5 +129,7 @@ EnteTextTheme _buildEnteTextStyle(Color color) { miniBold: mini.copyWith(color: color, fontWeight: _boldWeight), tiny: tiny.copyWith(color: color), tinyBold: tiny.copyWith(color: color, fontWeight: _boldWeight), + brandSmall: brandStyleSmall.copyWith(color: color), + brandMedium: brandStyleMedium.copyWith(color: color), ); } diff --git a/lib/ui/collections/section_title.dart b/lib/ui/collections/section_title.dart index 928d978f3..7f72552d6 100644 --- a/lib/ui/collections/section_title.dart +++ b/lib/ui/collections/section_title.dart @@ -40,18 +40,22 @@ class SectionTitle extends StatelessWidget { } } -RichText onEnteSection = RichText( - text: const TextSpan( - children: [ - TextSpan( - text: "On ", - style: TextStyle( - fontWeight: FontWeight.w600, - fontFamily: 'Inter', - fontSize: 21, +RichText getOnEnteSection(BuildContext context) { + final EnteTextTheme textTheme = getEnteTextTheme(context); + return RichText( + text: TextSpan( + children: [ + TextSpan( + text: "On ", + style: TextStyle( + fontWeight: FontWeight.w600, + fontFamily: 'Inter', + fontSize: 21, + color: textTheme.brandSmall.color, + ), ), - ), - TextSpan(text: "ente", style: brandStyleSmall), - ], - ), -); + TextSpan(text: "ente", style: textTheme.brandSmall), + ], + ), + ); +} diff --git a/lib/ui/collections_gallery_widget.dart b/lib/ui/collections_gallery_widget.dart index ff00d8772..253eb5dcf 100644 --- a/lib/ui/collections_gallery_widget.dart +++ b/lib/ui/collections_gallery_widget.dart @@ -140,7 +140,7 @@ class _CollectionsGalleryWidgetState extends State mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.end, children: [ - SectionTitle(titleWithBrand: onEnteSection), + SectionTitle(titleWithBrand: getOnEnteSection(context)), _sortMenu(), ], ), From 14a95bfebcc01ffaff81c93a37edf7453d8b9245 Mon Sep 17 00:00:00 2001 From: Neeraj Gupta <254676+ua741@users.noreply.github.com> Date: Wed, 26 Oct 2022 13:28:51 +0530 Subject: [PATCH 3/3] Fix UI bug for free trial --- lib/ui/payment/skip_subscription_widget.dart | 2 +- lib/ui/payment/subscription_common_widgets.dart | 2 +- lib/ui/payment/subscription_page.dart | 2 +- lib/ui/payment/subscription_plan_widget.dart | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/ui/payment/skip_subscription_widget.dart b/lib/ui/payment/skip_subscription_widget.dart index ae72e0d77..0e4490a3a 100644 --- a/lib/ui/payment/skip_subscription_widget.dart +++ b/lib/ui/payment/skip_subscription_widget.dart @@ -44,7 +44,7 @@ class SkipSubscriptionWidget extends StatelessWidget { BillingService.instance .verifySubscription(freeProductID, "", paymentProvider: "ente"); }, - child: const Text("Continue on free plan"), + child: const Text("Continue on free trial"), ), ); } diff --git a/lib/ui/payment/subscription_common_widgets.dart b/lib/ui/payment/subscription_common_widgets.dart index 99df81293..f6270f652 100644 --- a/lib/ui/payment/subscription_common_widgets.dart +++ b/lib/ui/payment/subscription_common_widgets.dart @@ -94,7 +94,7 @@ class ValidityWidget extends StatelessWidget { ); var message = "Renews on $endDate"; if (currentSubscription.productID == freeProductID) { - message = "Free plan valid till $endDate"; + message = "Free trial valid till $endDate"; } else if (currentSubscription.attributes?.isCancelled ?? false) { message = "Your subscription will be cancelled on $endDate"; } diff --git a/lib/ui/payment/subscription_page.dart b/lib/ui/payment/subscription_page.dart index ac0b5e905..28a1ef420 100644 --- a/lib/ui/payment/subscription_page.dart +++ b/lib/ui/payment/subscription_page.dart @@ -368,7 +368,7 @@ class _SubscriptionPageState extends State { planWidgets.add( SubscriptionPlanWidget( storage: _freePlan.storage, - price: "free", + price: "Free trial", period: "", isActive: true, ), diff --git a/lib/ui/payment/subscription_plan_widget.dart b/lib/ui/payment/subscription_plan_widget.dart index 776bd15e1..5c06c7998 100644 --- a/lib/ui/payment/subscription_plan_widget.dart +++ b/lib/ui/payment/subscription_plan_widget.dart @@ -19,7 +19,7 @@ class SubscriptionPlanWidget extends StatelessWidget { String _displayPrice() { final result = price + (period.isNotEmpty ? " / " + period : ""); - return result.isNotEmpty ? result : "Trial plan"; + return price.isNotEmpty ? result : "Free trial"; } @override