From 49827e979e81b37cbf6e7a5fd9bb0379547e7fda Mon Sep 17 00:00:00 2001 From: mso7nueh Date: Wed, 2 Jul 2025 16:41:49 +0300 Subject: [PATCH] feat(qrcode): Issue-515 --- ios/Runner.xcodeproj/project.pbxproj | 6 +- ios/Runner/Info.plist | 2 +- .../auth/presentation/pages/auth_screen.dart | 73 ++++++++++++++++++- pubspec.yaml | 6 +- 4 files changed, 78 insertions(+), 9 deletions(-) diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 65f4f4f7..046c0614 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -388,7 +388,7 @@ CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "Apple Distribution: ITVIO, OOO (VL68C36HYS)"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 38; + CURRENT_PROJECT_VERSION = 39; DEVELOPMENT_TEAM = VL68C36HYS; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -538,7 +538,7 @@ CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "Apple Distribution: ITVIO, OOO (VL68C36HYS)"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 38; + CURRENT_PROJECT_VERSION = 39; DEVELOPMENT_TEAM = VL68C36HYS; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -576,7 +576,7 @@ CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; CODE_SIGN_IDENTITY = "Apple Distribution: ITVIO, OOO (VL68C36HYS)"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 38; + CURRENT_PROJECT_VERSION = 39; DEVELOPMENT_TEAM = VL68C36HYS; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index 72d42aff..d7a769f2 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -21,7 +21,7 @@ CFBundleSignature ???? CFBundleVersion - 38 + 39 ITSAppUsesNonExemptEncryption LSRequiresIPhoneOS diff --git a/lib/features/auth/presentation/pages/auth_screen.dart b/lib/features/auth/presentation/pages/auth_screen.dart index 31028059..c0847e0e 100644 --- a/lib/features/auth/presentation/pages/auth_screen.dart +++ b/lib/features/auth/presentation/pages/auth_screen.dart @@ -258,8 +258,77 @@ class _AuthScreenState extends State { backgroundColor: state is AuthStateLoading ? Colors.black.withAlpha(50) : appTheme.blueA400, onPressed: state is AuthStateLoading ? null - : () { - GoRouter.of(context).pushNamed('scanQRCodeScreen'); + : () async { + await showDialog( + context: context, + builder: (BuildContext context) { + return Dialog( + child: Padding( + padding: const EdgeInsets.all(24), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + const Text( + 'Где взять QR-код?\n', + style: TextStyle( + fontSize: 18, + ), + ), + Text( + '1. Войдите на сайте $baseUrl в свой аккаунт\n\n2. Перейдите в настройки профиля\n\n3. В разделе "Доп информация" перейдите на "QR Login"'), + const SizedBox(height: 12), + Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + InkWell( + borderRadius: BorderRadius.circular(8), + onTap: () { + AppRouter.navigatorKey.currentContext?.pop(); + }, + child: Ink( + padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(8), + ), + child: const Text( + 'Отмена', + style: TextStyle( + color: Colors.black, + fontWeight: FontWeight.w400, + ), + ), + ), + ), + const SizedBox(width: 8), + InkWell( + borderRadius: BorderRadius.circular(8), + onTap: () { + AppRouter.navigatorKey.currentContext?.pop(); + AppRouter.navigatorKey.currentContext?.pushNamed('scanQRCodeScreen'); + }, + child: Ink( + padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(8), + ), + child: Text( + 'Перейти', + style: TextStyle( + color: appTheme.blueA400, + fontWeight: FontWeight.w600, + ), + ), + ), + ), + ], + ), + ], + ), + ), + ); + }, + ); }, label: state is AuthStateLoading ? const CupertinoActivityIndicator() diff --git a/pubspec.yaml b/pubspec.yaml index cdc5881d..d5c928e7 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: eatvio_app description: A new Flutter project. -version: 1.1.15+45 +version: 1.1.16+46 publish_to: 'none' environment: @@ -58,7 +58,7 @@ dependencies: http: ^1.4.0 flutter_native_splash: ^2.4.6 webview_flutter: ^4.13.0 - sentry_flutter: ^9.2.0 + sentry_flutter: ^8.14.2 connectivity_plus: ^6.1.4 visibility_detector: ^0.4.0+2 firebase_core: ^3.15.0 @@ -83,7 +83,7 @@ dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^5.0.0 + flutter_lints: ^6.0.0 flutter: uses-material-design: true