From c4dedac3f304e68f0686be7d432cedb295c03208 Mon Sep 17 00:00:00 2001 From: Username1548 Date: Tue, 12 Aug 2025 12:27:58 +0700 Subject: [PATCH 1/2] added build date --- .gitea/workflows/test.yml | 6 +++++- ios/fastlane/Fastfile | 4 +++- lib/core/const.dart | 1 + .../menu/presentation/pages/menu_screen.dart | 7 ++++++- .../support/presentation/pages/support_screen.dart | 13 +++++++++++-- 5 files changed, 26 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index c7aefd5c..e6a74c64 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -144,7 +144,11 @@ jobs: run: flutter test - name: Build apk - run: flutter build apk --release --dart-define=HIDE_PLANS=false + run: | + BUILD_DATE=$(TZ=Europe/Moscow date +'%Y-%m-%d %H:%M:%S') + flutter build apk --release \ + --dart-define=HIDE_PLANS=false \ + --dart-define=BUILD_DATE="$BUILD_DATE" - name: Rename and move apk run: | diff --git a/ios/fastlane/Fastfile b/ios/fastlane/Fastfile index f7261196..ebd745be 100644 --- a/ios/fastlane/Fastfile +++ b/ios/fastlane/Fastfile @@ -46,13 +46,15 @@ platform :ios do match(type: "appstore", readonly: true) increment_build_number(xcodeproj: "Runner.xcodeproj") + + build_date = Time.now.getlocal("+03:00").strftime("%Y-%m-%d %H:%M:%S") build_app( workspace: "Runner.xcworkspace", scheme: "Runner", export_method: "app-store", codesigning_identity: "Apple Distribution", - xcargs: "--dart-define=HIDE_PLANS=true" + xcargs: "--dart-define=HIDE_PLANS=true --dart-define=BUILD_DATE='#{build_date}'" ) diff --git a/lib/core/const.dart b/lib/core/const.dart index efed7d49..98f7bc4a 100644 --- a/lib/core/const.dart +++ b/lib/core/const.dart @@ -2,6 +2,7 @@ import 'package:eatvio_app/core/env_config.dart'; String baseUrl = EnvConfig.baseUrl; bool hidePlans = const bool.fromEnvironment('HIDE_PLANS', defaultValue: false); +const buildDate = String.fromEnvironment('BUILD_DATE', defaultValue: ''); const List durationValues = [7, 14, 21]; diff --git a/lib/features/menu/presentation/pages/menu_screen.dart b/lib/features/menu/presentation/pages/menu_screen.dart index 90c866a8..d4ac69ef 100644 --- a/lib/features/menu/presentation/pages/menu_screen.dart +++ b/lib/features/menu/presentation/pages/menu_screen.dart @@ -156,7 +156,12 @@ class _AppInfoState extends State { alignment: Alignment.centerLeft, child: Padding( padding: const EdgeInsetsGeometry.only(left: 16), - child: Text('Версия приложения: $version ($buildNumber)', style: TextStyles.textXSSemibold.copyWith(color: appTheme.gray)), + child: Column( + children: [ + Text('Версия приложения: $version ($buildNumber)', style: TextStyles.textXSSemibold.copyWith(color: appTheme.gray)), + if (buildDate != '') Text('Дата сборки: $buildDate', style: TextStyles.textXSSemibold.copyWith(color: appTheme.gray)), + ], + ), ), ); } diff --git a/lib/features/support/presentation/pages/support_screen.dart b/lib/features/support/presentation/pages/support_screen.dart index 1fc70bb0..6aa44a42 100644 --- a/lib/features/support/presentation/pages/support_screen.dart +++ b/lib/features/support/presentation/pages/support_screen.dart @@ -71,15 +71,24 @@ class SupportScreen extends StatelessWidget { const SizedBox(height: 12), if (!hidePlans) ...[ InkWell( - onTap: () async => await launchUrl(Uri.parse('$baseUrl/docs/privacy.pdf')), + onTap: () async => await launchUrl(Uri.parse('$baseUrl/docs/public_offer.pdf')), borderRadius: BorderRadius.circular(16), child: const Padding( padding: EdgeInsets.symmetric(horizontal: 16, vertical: 4), - child: Text('Политика конфиденциальности', style: TextStyle(fontSize: 16)), + child: Text('Публичная офёрта', style: TextStyle(fontSize: 16)), ), ), const SizedBox(height: 8), ], + InkWell( + onTap: () async => await launchUrl(Uri.parse('$baseUrl/docs/privacy.pdf')), + borderRadius: BorderRadius.circular(16), + child: const Padding( + padding: EdgeInsets.symmetric(horizontal: 16, vertical: 4), + child: Text('Политика конфиденциальности', style: TextStyle(fontSize: 16)), + ), + ), + const SizedBox(height: 8), InkWell( onTap: () async => await launchUrl(Uri.parse('$baseUrl/company-details')), borderRadius: BorderRadius.circular(16), From 91bb5cf483042d443c12dda9a05d14fcd57add83 Mon Sep 17 00:00:00 2001 From: Username1548 Date: Tue, 12 Aug 2025 09:01:31 +0300 Subject: [PATCH 2/2] feat(menu): fixed indentation --- lib/features/menu/presentation/pages/menu_screen.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/features/menu/presentation/pages/menu_screen.dart b/lib/features/menu/presentation/pages/menu_screen.dart index d4ac69ef..7e4c358a 100644 --- a/lib/features/menu/presentation/pages/menu_screen.dart +++ b/lib/features/menu/presentation/pages/menu_screen.dart @@ -157,6 +157,7 @@ class _AppInfoState extends State { child: Padding( padding: const EdgeInsetsGeometry.only(left: 16), child: Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ Text('Версия приложения: $version ($buildNumber)', style: TextStyles.textXSSemibold.copyWith(color: appTheme.gray)), if (buildDate != '') Text('Дата сборки: $buildDate', style: TextStyles.textXSSemibold.copyWith(color: appTheme.gray)),