diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 8d0d5b4..7097adf 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -30,6 +30,8 @@ PODS: - SwiftProtobuf (1.9.0) - url_launcher (0.0.1): - Flutter + - url_launcher_linux (0.0.1): + - Flutter - url_launcher_macos (0.0.1): - Flutter - url_launcher_web (0.0.1): @@ -48,6 +50,7 @@ DEPENDENCIES: - shared_preferences_web (from `.symlinks/plugins/shared_preferences_web/ios`) - sqflite (from `.symlinks/plugins/sqflite/ios`) - url_launcher (from `.symlinks/plugins/url_launcher/ios`) + - url_launcher_linux (from `.symlinks/plugins/url_launcher_linux/ios`) - url_launcher_macos (from `.symlinks/plugins/url_launcher_macos/ios`) - url_launcher_web (from `.symlinks/plugins/url_launcher_web/ios`) @@ -82,6 +85,8 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/sqflite/ios" url_launcher: :path: ".symlinks/plugins/url_launcher/ios" + url_launcher_linux: + :path: ".symlinks/plugins/url_launcher_linux/ios" url_launcher_macos: :path: ".symlinks/plugins/url_launcher_macos/ios" url_launcher_web: @@ -103,6 +108,7 @@ SPEC CHECKSUMS: sqflite: 4001a31ff81d210346b500c55b17f4d6c7589dd0 SwiftProtobuf: ecbec1be9036d15655f6b3443a1c4ea693c97932 url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef + url_launcher_linux: ac237cb7a8058736e4aae38bdbcc748a4b394cc0 url_launcher_macos: fd7894421cd39320dce5f292fc99ea9270b2a313 url_launcher_web: e5527357f037c87560776e36436bf2b0288b965c diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index fbf1f74..27c4d75 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -392,7 +392,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 10; + CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 94BM6VL7L8; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -531,7 +531,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 10; + CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 94BM6VL7L8; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -563,7 +563,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 10; + CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = 94BM6VL7L8; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( diff --git a/lib/views/home/components/header_title.dart b/lib/views/home/components/header_title.dart index 94d18dc..7e92489 100644 --- a/lib/views/home/components/header_title.dart +++ b/lib/views/home/components/header_title.dart @@ -11,36 +11,56 @@ class HeaderTitle extends StatelessWidget { @override Widget build(BuildContext context) { return StoreConnector( - converter: (store) => store.state.userState, - builder: (context, vm) { - return Row( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Container( - width: 75, - child: Image( - image: AssetImage('assets/images/logo.png'), - fit: BoxFit.fitWidth, + converter: (store) => store.state.userState, + builder: (context, vm) { + return Row( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + Container( + width: 75, + child: Image( + image: AssetImage('assets/images/logo.png'), + fit: BoxFit.fitWidth, + ), + margin: const EdgeInsets.only(right: 15), ), - margin: const EdgeInsets.only(right: 15), - ), - Expanded( - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text('Пользователь: ${vm.user.email}', overflow: TextOverflow.fade, maxLines: 1, softWrap: false, style: TextStyle(fontSize: 13, color: Colors.black, ),), - vm.smena.message !=null - ? Text(vm.smena.message, style: TextStyle(fontSize: 13, color: redColor) ) - : vm.smena.startedAt !=null - ? Text('Смена открыта', overflow: TextOverflow.fade, maxLines: 1, softWrap: false , style: TextStyle(fontSize: 13, color: Colors.black),) - : Text('Смена от:', style: TextStyle(fontSize: 13, color: Colors.black),), - ], - ), - ) - ], - ); - } - ); + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + 'Пользователь: ${vm.user.email}', + overflow: TextOverflow.fade, + maxLines: 1, + softWrap: false, + style: TextStyle( + fontSize: 13, + color: Colors.black, + ), + ), + vm.smena.message != null + ? Text(vm.smena.message, + style: TextStyle(fontSize: 13, color: redColor)) + : vm.smena.startedAt != null + ? Text( + 'Смена открыта', + overflow: TextOverflow.fade, + maxLines: 1, + softWrap: false, + style: TextStyle( + fontSize: 13, color: Colors.black), + ) + : Text( + '', + style: TextStyle( + fontSize: 13, color: Colors.black), + ), + ], + ), + ) + ], + ); + }); } } diff --git a/lib/views/login/login_view.dart b/lib/views/login/login_view.dart index 0e3e668..e6b122d 100644 --- a/lib/views/login/login_view.dart +++ b/lib/views/login/login_view.dart @@ -29,8 +29,7 @@ class LoginView extends StatefulWidget { } class _LoginViewState extends State { - - TextEditingController emailController ; + TextEditingController emailController; TextEditingController passwordController; @@ -45,17 +44,19 @@ class _LoginViewState extends State { @override void initState() { super.initState(); - if(widget.loginModel!=null && widget.loginModel.authType == AuthenticateTypeLogin) { + if (widget.loginModel != null && + widget.loginModel.authType == AuthenticateTypeLogin) { emailController = TextEditingController(text: widget.loginModel.login); - passwordController = TextEditingController(text: widget.loginModel.password); + passwordController = + TextEditingController(text: widget.loginModel.password); } else { emailController = TextEditingController(); - passwordController = TextEditingController(); + passwordController = TextEditingController(); } } @override - void dispose() { + void dispose() { emailController.dispose(); passwordController.dispose(); super.dispose(); @@ -83,7 +84,14 @@ class _LoginViewState extends State { height: 150, child: Image.asset('assets/images/logo.png'), ), - Positioned(child: Text('онлайн касса', style: TextStyle(fontWeight: FontWeight.bold),), bottom: 23.0,left: 25.0,), + Positioned( + child: Text( + 'онлайн касса', + style: TextStyle(fontWeight: FontWeight.bold), + ), + bottom: 23.0, + left: 25.0, + ), ], ), @@ -96,23 +104,26 @@ class _LoginViewState extends State { ), verticalSpaceSmall, InputField( - placeholder: 'Пароль', - password: true, - controller: passwordController, - fieldFocusNode: passwordNode, - additionalNote: vm.loginFormMessage.password, - enterPressed: _pressBtnEnter, - textInputAction: TextInputAction.done, + placeholder: 'Пароль', + password: true, + controller: passwordController, + fieldFocusNode: passwordNode, + additionalNote: vm.loginFormMessage.password, + enterPressed: _pressBtnEnter, + textInputAction: TextInputAction.done, ), verticalSpaceMedium, Row( mainAxisSize: MainAxisSize.max, mainAxisAlignment: MainAxisAlignment.end, children: [ - BusyButton( - title: 'Войти', - busy: vm.isLoading, - onPressed: _pressBtnEnter, + SizedBox( + width: 150, + child: BusyButton( + title: 'Войти', + busy: vm.isLoading, + onPressed: _pressBtnEnter, + ), ) ], ), @@ -134,7 +145,8 @@ class _LoginViewState extends State { } _pressBtnEnter() async { - if(emailController.text!=null && emailController.text.toLowerCase().trim().startsWith('test')){ + if (emailController.text != null && + emailController.text.toLowerCase().trim().startsWith('test')) { _apiService.test = true; } else { _apiService.test = false; @@ -158,13 +170,13 @@ class _LoginViewState extends State { // .formatNote); // If a unknown format was scanned this field contains a note if (result.type == ResultType.Barcode && result.rawContent?.length == 60) { - if(result.rawContent.toLowerCase().trim().startsWith('test')){ - _apiService.test = true; - } else { - _apiService.test = false; - } + if (result.rawContent.toLowerCase().trim().startsWith('test')) { + _apiService.test = true; + } else { + _apiService.test = false; + } Redux.store.dispatch(authenticateToken(result.rawContent)); - } else if (result.type == ResultType.Error ) { + } else if (result.type == ResultType.Error) { _dialogService.showDialog(description: 'Не верный формат QR кода'); } } on PlatformException catch (e) { @@ -188,4 +200,4 @@ class LoginModel { final String login; final String password; LoginModel({this.authType, this.login, this.password}); -} \ No newline at end of file +} diff --git a/lib/widgets/fields/busy_button.dart b/lib/widgets/fields/busy_button.dart index 2a4d3c2..f12b958 100644 --- a/lib/widgets/fields/busy_button.dart +++ b/lib/widgets/fields/busy_button.dart @@ -41,40 +41,46 @@ class _BusyButtonState extends State { child: InkWell( onTap: widget.busy || !widget.enabled ? null : widget.onPressed, child: AnimatedContainer( - height: widget.busy ? 40 : 40, + height: widget.busy ? 45 : 45, //width: widget.busy ? 40 : 40, duration: const Duration(milliseconds: 300), alignment: Alignment.center, margin: EdgeInsets.symmetric( horizontal: widget.busy ? 10 : 25, - vertical: widget.busy ? 10 : 15), + vertical: widget.busy ? 10 : 10), child: Row( mainAxisAlignment: MainAxisAlignment.center, children: [ !widget.busy - ? Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - widget.icon != null - ? Container( - child: (Icon( - widget.icon, - color: whiteColor, - )), - margin: const EdgeInsets.only(right: 10.0), - ) - : (Container()), - AutoSizeText( - widget.title, - textAlign: TextAlign.center, - style: buttonTitleTextStyle, - ), - ], + ? Expanded( + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + widget.icon != null + ? Container( + child: (Icon( + widget.icon, + color: whiteColor, + )), + margin: const EdgeInsets.only(right: 10.0), + ) + : (Container()), + AutoSizeText( + widget.title, + textAlign: TextAlign.center, + style: buttonTitleTextStyle, + ), + ], + ), ) - : CircularProgressIndicator( - strokeWidth: 2, - valueColor: - AlwaysStoppedAnimation(Colors.white)), + : SizedBox( + width: 30, + height: 30, + child: CircularProgressIndicator( + strokeWidth: 2, + valueColor: + AlwaysStoppedAnimation(Colors.white)), + ), ], ), ),