From 9c5560c8dfcc7bc68ef045192bec1df5493def5e Mon Sep 17 00:00:00 2001 From: ashilkn Date: Fri, 17 Nov 2023 13:40:24 +0530 Subject: [PATCH 1/6] update change log --- CHANGELOG.md | 8 ++++++ .../notification/update/change_log_page.dart | 28 ++----------------- 2 files changed, 10 insertions(+), 26 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5863553ed..05a94f454 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,14 @@ # CHANGELOG +## v0.7.117 + +### Added +* #### Explore with the new Search Tab ✨ + + A dedicated search tab with distinct sections for effortless discovery. + + ## v0.7.82 ### Added diff --git a/lib/ui/notification/update/change_log_page.dart b/lib/ui/notification/update/change_log_page.dart index d38aee7e5..5416035b3 100644 --- a/lib/ui/notification/update/change_log_page.dart +++ b/lib/ui/notification/update/change_log_page.dart @@ -118,35 +118,11 @@ class _ChangeLogPageState extends State { final List items = []; items.add( ChangeLogEntry( - "Hidden albums ✨", - 'You can now hide albums, just like individual memories.\n', - ), - ); - items.add( - ChangeLogEntry( - "Album improvements ✨", - 'You can now pin your favourite albums, and set cover photos for them.\n' - '\nWe have also added a way to first create empty albums, and then add photos to it, both from ente and your device gallery.\n'), - ); - - items.add( - ChangeLogEntry( - "Email verification ✨", - 'We have now made email verification optional, so you can sign in with' - ' just your email address and password, without waiting for a verification code.\n' - '\nYou can opt in / out of email verification from Settings > Security.\n', + "Explore with the new Search Tab ✨", + 'A dedicated search tab with distinct sections for effortless discovery.\n', ), ); - items.add( - ChangeLogEntry( - "Bug fixes & other enhancements", - 'We have squashed a few pesky bugs that were reported by our community,' - 'and have improved the experience for albums and quick links.\n' - '\nIf you would like to help us improve ente, come join the ente community!', - isFeature: false, - ), - ); return Container( padding: const EdgeInsets.only(left: 16), child: Scrollbar( From dcf2b11cdcb65fc983a4f455c6cbb86cf2a44685 Mon Sep 17 00:00:00 2001 From: ashilkn Date: Fri, 17 Nov 2023 15:37:37 +0530 Subject: [PATCH 2/6] show black friday banner on change log widget --- .../notification/update/change_log_page.dart | 52 ++++++++++++++----- lib/ui/settings_page.dart | 19 +------ lib/utils/black_friday_util.dart | 21 ++++++++ 3 files changed, 61 insertions(+), 31 deletions(-) create mode 100644 lib/utils/black_friday_util.dart diff --git a/lib/ui/notification/update/change_log_page.dart b/lib/ui/notification/update/change_log_page.dart index 5416035b3..053ad0973 100644 --- a/lib/ui/notification/update/change_log_page.dart +++ b/lib/ui/notification/update/change_log_page.dart @@ -5,8 +5,10 @@ import 'package:photos/theme/ente_theme.dart'; import 'package:photos/ui/components/buttons/button_widget.dart'; import 'package:photos/ui/components/divider_widget.dart'; import 'package:photos/ui/components/models/button_type.dart'; +import "package:photos/ui/components/notification_widget.dart"; import 'package:photos/ui/components/title_bar_title_widget.dart'; import 'package:photos/ui/notification/update/change_log_entry.dart'; +import "package:photos/utils/black_friday_util.dart"; import "package:url_launcher/url_launcher_string.dart"; class ChangeLogPage extends StatefulWidget { @@ -64,6 +66,26 @@ class _ChangeLogPageState extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ + shouldShowBfBanner() + ? Padding( + padding: const EdgeInsets.only(bottom: 8), + child: NotificationWidget( + isBlackFriday: true, + startIcon: Icons.celebration, + actionIcon: Icons.arrow_forward_outlined, + text: S.of(context).blackFridaySale, + subText: S.of(context).upto50OffUntil4thDec, + type: NotificationType.goldenBanner, + onTap: () async { + launchUrlString( + "https://ente.io/blackfriday", + mode: LaunchMode.platformDefault, + ); + }, + ), + ) + : const SizedBox.shrink(), + ButtonWidget( buttonType: ButtonType.trailingIconPrimary, buttonSize: ButtonSize.large, @@ -89,19 +111,23 @@ class _ChangeLogPageState extends State { // await UpdateService.instance.launchReviewUrl(); // }, // ), - ButtonWidget( - buttonType: ButtonType.trailingIconSecondary, - buttonSize: ButtonSize.large, - labelText: "Join the ente community", - icon: Icons.people_alt_rounded, - iconColor: enteColorScheme.primary500, - onTap: () async { - launchUrlString( - "https://ente.io/community", - mode: LaunchMode.externalApplication, - ); - }, - ), + + shouldShowBfBanner() + ? const SizedBox.shrink() + : ButtonWidget( + buttonType: ButtonType.trailingIconSecondary, + buttonSize: ButtonSize.large, + labelText: "Join the ente community", + icon: Icons.people_alt_rounded, + iconColor: enteColorScheme.primary500, + onTap: () async { + launchUrlString( + "https://ente.io/community", + mode: LaunchMode.externalApplication, + ); + }, + ), + const SizedBox(height: 8), ], ), diff --git a/lib/ui/settings_page.dart b/lib/ui/settings_page.dart index 044a70975..2e6d4dda6 100644 --- a/lib/ui/settings_page.dart +++ b/lib/ui/settings_page.dart @@ -9,7 +9,6 @@ import 'package:photos/events/opened_settings_event.dart'; import "package:photos/generated/l10n.dart"; import 'package:photos/services/feature_flag_service.dart'; import "package:photos/services/storage_bonus_service.dart"; -import "package:photos/services/user_service.dart"; import 'package:photos/theme/colors.dart'; import 'package:photos/theme/ente_theme.dart'; import "package:photos/ui/components/notification_widget.dart"; @@ -28,6 +27,7 @@ import 'package:photos/ui/settings/storage_card_widget.dart'; import 'package:photos/ui/settings/support_section_widget.dart'; import 'package:photos/ui/settings/theme_switch_widget.dart'; import "package:photos/ui/sharing/verify_identity_dialog.dart"; +import "package:photos/utils/black_friday_util.dart"; import "package:photos/utils/navigation_util.dart"; import "package:url_launcher/url_launcher_string.dart"; @@ -188,23 +188,6 @@ class SettingsPage extends StatelessWidget { ); } - bool shouldShowBfBanner() { - if (!Platform.isAndroid && !kDebugMode) { - return false; - } - // if date is after 5th of December 2023, 00:00:00, hide banner - if (DateTime.now().isAfter(DateTime(2023, 12, 5))) { - return false; - } - // if coupon is already applied, can hide the banner - return (UserService.instance - .getCachedUserDetails() - ?.bonusData - ?.getAddOnBonuses() - .isEmpty ?? - true); - } - Future _showVerifyIdentityDialog(BuildContext context) async { await showDialog( context: context, diff --git a/lib/utils/black_friday_util.dart b/lib/utils/black_friday_util.dart new file mode 100644 index 000000000..0887d6b7a --- /dev/null +++ b/lib/utils/black_friday_util.dart @@ -0,0 +1,21 @@ +import "dart:io"; + +import "package:flutter/foundation.dart"; +import "package:photos/services/user_service.dart"; + +bool shouldShowBfBanner() { + if (!Platform.isAndroid && !kDebugMode) { + return false; + } + // if date is after 5th of December 2023, 00:00:00, hide banner + if (DateTime.now().isAfter(DateTime(2023, 12, 5))) { + return false; + } + // if coupon is already applied, can hide the banner + return (UserService.instance + .getCachedUserDetails() + ?.bonusData + ?.getAddOnBonuses() + .isEmpty ?? + true); +} From 38ae3538e7c945dd571c368a26c0f41e9543ecb5 Mon Sep 17 00:00:00 2001 From: ashilkn Date: Fri, 17 Nov 2023 15:38:52 +0530 Subject: [PATCH 3/6] update change log version --- lib/services/update_service.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/services/update_service.dart b/lib/services/update_service.dart index 9af7c7045..be67ae225 100644 --- a/lib/services/update_service.dart +++ b/lib/services/update_service.dart @@ -16,7 +16,7 @@ class UpdateService { static final UpdateService instance = UpdateService._privateConstructor(); static const kUpdateAvailableShownTimeKey = "update_available_shown_time_key"; static const changeLogVersionKey = "update_change_log_key"; - static const currentChangeLogVersion = 12; + static const currentChangeLogVersion = 13; LatestVersionInfo? _latestVersion; final _logger = Logger("UpdateService"); From 4f2cf43890401d5fab2a0897ea2d95b398d45b87 Mon Sep 17 00:00:00 2001 From: ashilkn Date: Fri, 17 Nov 2023 15:55:59 +0530 Subject: [PATCH 4/6] bump up version --- CHANGELOG.md | 2 +- pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 05a94f454..ec81a7f40 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ # CHANGELOG -## v0.7.117 +## v0.7.118 ### Added * #### Explore with the new Search Tab ✨ diff --git a/pubspec.yaml b/pubspec.yaml index 4843978fc..778b09089 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -12,7 +12,7 @@ description: ente photos application # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 0.7.117+517 +version: 0.7.118+518 environment: sdk: ">=3.0.0 <4.0.0" From ce064f4b3526e7e7f399b2243f34c0414a615b15 Mon Sep 17 00:00:00 2001 From: ashilkn Date: Fri, 17 Nov 2023 16:33:50 +0530 Subject: [PATCH 5/6] update change log copy --- CHANGELOG.md | 12 +++++++++++- lib/ui/notification/update/change_log_page.dart | 11 ++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ec81a7f40..16733e963 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,17 @@ ### Added * #### Explore with the new Search Tab ✨ - A dedicated search tab with distinct sections for effortless discovery. + Introducing a dedicated search tab with distinct sections for effortless discovery. + + You can now discover items that come under different Locations, Moments, Contacts, Photo descriptions, Albums and File types with ease. + +* #### Black Friday Sale 🎉 + + You can now purchase Ente's plans for 3 years at 30% off and 5 years at 50% off. + + The storage you purchase will be stacked on top of your current plan. + + This is the lowest our prices will ever be, so do consider upgrading! ## v0.7.82 diff --git a/lib/ui/notification/update/change_log_page.dart b/lib/ui/notification/update/change_log_page.dart index 053ad0973..a9501c597 100644 --- a/lib/ui/notification/update/change_log_page.dart +++ b/lib/ui/notification/update/change_log_page.dart @@ -145,7 +145,16 @@ class _ChangeLogPageState extends State { items.add( ChangeLogEntry( "Explore with the new Search Tab ✨", - 'A dedicated search tab with distinct sections for effortless discovery.\n', + 'Introducing a dedicated search tab with distinct sections for effortless discovery.\n' + '\nYou can now discover items that come under different Locations, Moments, Contacts, Photo descriptions, Albums and File types with ease.\n', + ), + ); + items.add( + ChangeLogEntry( + "Black Friday Sale 🎉", + "You can now purchase Ente's plans for 3 years at 30% off and 5 years at 50% off!\n" + '\nThe storage you purchase will be stacked on top of your current plan.\n' + '\nThis is the lowest our prices will ever be, so do consider upgrading!\n', ), ); From 0c47ba60f20b73d977c42566147478a1e1fe6596 Mon Sep 17 00:00:00 2001 From: ashilkn Date: Fri, 17 Nov 2023 16:37:47 +0530 Subject: [PATCH 6/6] add shimmer --- .../notification/update/change_log_page.dart | 43 ++++++++++++------- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/lib/ui/notification/update/change_log_page.dart b/lib/ui/notification/update/change_log_page.dart index a9501c597..428d9f811 100644 --- a/lib/ui/notification/update/change_log_page.dart +++ b/lib/ui/notification/update/change_log_page.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import "package:flutter_animate/flutter_animate.dart"; import "package:photos/generated/l10n.dart"; import 'package:photos/services/update_service.dart'; import 'package:photos/theme/ente_theme.dart'; @@ -67,22 +68,32 @@ class _ChangeLogPageState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ shouldShowBfBanner() - ? Padding( - padding: const EdgeInsets.only(bottom: 8), - child: NotificationWidget( - isBlackFriday: true, - startIcon: Icons.celebration, - actionIcon: Icons.arrow_forward_outlined, - text: S.of(context).blackFridaySale, - subText: S.of(context).upto50OffUntil4thDec, - type: NotificationType.goldenBanner, - onTap: () async { - launchUrlString( - "https://ente.io/blackfriday", - mode: LaunchMode.platformDefault, - ); - }, - ), + ? RepaintBoundary( + child: Padding( + padding: const EdgeInsets.only(bottom: 8), + child: NotificationWidget( + isBlackFriday: true, + startIcon: Icons.celebration, + actionIcon: Icons.arrow_forward_outlined, + text: S.of(context).blackFridaySale, + subText: S.of(context).upto50OffUntil4thDec, + type: NotificationType.goldenBanner, + onTap: () async { + launchUrlString( + "https://ente.io/blackfriday", + mode: LaunchMode.platformDefault, + ); + }, + ), + ) + .animate( + onPlay: (controller) => controller.repeat(), + ) + .shimmer( + duration: 1000.ms, + delay: 3200.ms, + size: 0.6, + ), ) : const SizedBox.shrink(),