diff --git a/android/.kotlin/sessions/kotlin-compiler-10039299475187077818.salive b/android/.kotlin/sessions/kotlin-compiler-10039299475187077818.salive deleted file mode 100644 index e69de29b..00000000 diff --git a/assets/icons/mail_logo.svg b/assets/icons/mail_logo.svg new file mode 100644 index 00000000..5891b116 --- /dev/null +++ b/assets/icons/mail_logo.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/assets/icons/ok_logo.svg b/assets/icons/ok_logo.svg new file mode 100644 index 00000000..07a62fbd --- /dev/null +++ b/assets/icons/ok_logo.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/icons/vk_logo.svg b/assets/icons/vk_logo.svg new file mode 100644 index 00000000..274b3486 --- /dev/null +++ b/assets/icons/vk_logo.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/assets/icons/yandex_logo.svg b/assets/icons/yandex_logo.svg new file mode 100644 index 00000000..51b51eee --- /dev/null +++ b/assets/icons/yandex_logo.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/lib/features/auth/presentation/pages/auth_screen.dart b/lib/features/auth/presentation/pages/auth_screen.dart index f9eeddf5..970ea8d3 100644 --- a/lib/features/auth/presentation/pages/auth_screen.dart +++ b/lib/features/auth/presentation/pages/auth_screen.dart @@ -9,6 +9,7 @@ import 'package:eatvio_app/core/theme/theme_helper.dart'; import 'package:eatvio_app/core/utils/image_constant.dart'; import 'package:eatvio_app/core/utils/toasts.dart'; import 'package:eatvio_app/core/websockets/ws_manager.dart'; +import 'package:eatvio_app/core/widgets/custom_divider.dart'; import 'package:eatvio_app/core/widgets/custom_text_form_field.dart'; import 'package:eatvio_app/features/auth/presentation/bloc/auth_cubit/auth_cubit.dart'; import 'package:eatvio_app/features/auth/presentation/bloc/auth_cubit/auth_state.dart'; @@ -119,6 +120,42 @@ class _AuthScreenState extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ + // Social auth buttons at the top (outlined) + const Text('Авторизация через:', style: TextStyle(fontWeight: FontWeight.w600)), + const SizedBox(height: 8), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + _SocialButton( + onTap: () => _onVkPressed(context), + backgroundColor: const Color(0xFF2787F5), + tooltip: 'VK ID', + child: SvgPicture.asset('assets/icons/vk_logo.svg', height: 24, width: 24), + ), + _SocialButton( + onTap: _onOkPressed, + backgroundColor: const Color(0xFFF58220), + tooltip: 'Одноклассники', + child: SvgPicture.asset('assets/icons/ok_logo.svg', height: 24, width: 24), + ), + _SocialButton( + onTap: _onMailRuPressed, + backgroundColor: const Color(0xFF005FF9), + tooltip: 'Mail.ru', + child: SvgPicture.asset('assets/icons/mail_logo.svg', height: 24, width: 24), + ), + _SocialButton( + onTap: _onYandexPressed, + backgroundColor: const Color(0xFFFFCC00), + tooltip: 'Яндекс ID', + child: SvgPicture.asset('assets/icons/yandex_logo.svg', height: 24, width: 24), + ), + ], + ), + const SizedBox(height: 16), + const CustomDivider(), + const SizedBox(height: 8), + const SizedBox(height: 16), Text(s.email), const SizedBox(height: 4), CustomTextFormField( @@ -168,52 +205,6 @@ class _AuthScreenState extends State { ), ], ), - // const SizedBox(height: 16), - Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - _SocialButton( - onTap: () => _onVkPressed(context), - backgroundColor: const Color(0xFF2787F5), - tooltip: 'VK ID', - child: SvgPicture.asset( - 'assets/icons/vk.svg', - height: 24, - width: 24, - colorFilter: const ColorFilter.mode(Colors.white, BlendMode.srcIn), - ), - ), - _SocialButton( - onTap: _onOkPressed, - backgroundColor: const Color(0xFFF58220), - tooltip: 'Одноклассники', - child: SvgPicture.asset( - 'assets/icons/ok.svg', - height: 24, - width: 24, - colorFilter: const ColorFilter.mode(Colors.white, BlendMode.srcIn), - ), - ), - const _SocialButton( - onTap: _onMailRuPressed, - backgroundColor: Color(0xFF005FF9), - tooltip: 'Mail.ru', - child: Text( - 'Mail', - style: TextStyle(color: Colors.white, fontWeight: FontWeight.w700), - ), - ), - const _SocialButton( - onTap: _onYandexPressed, - backgroundColor: Color(0xFFFFCC00), - tooltip: 'Яндекс ID', - child: Text( - 'Yandex', - style: TextStyle(color: Colors.black, fontWeight: FontWeight.w700), - ), - ), - ], - ), const Spacer(), Center( child: RichText( @@ -367,7 +358,6 @@ class _AuthScreenState extends State { } } -// ignore: unused_element class _SocialButton extends StatelessWidget { const _SocialButton({required this.onTap, required this.child, required this.backgroundColor, required this.tooltip}); @@ -381,12 +371,16 @@ class _SocialButton extends StatelessWidget { return Tooltip( message: tooltip, child: InkWell( - borderRadius: BorderRadius.circular(12), + borderRadius: BorderRadius.circular(20), onTap: onTap, child: Ink( height: 48, width: (MediaQuery.of(context).size.width - 16 * 2 - 12 * 3) / 4, - decoration: BoxDecoration(color: backgroundColor, borderRadius: BorderRadius.circular(12)), + decoration: BoxDecoration( + color: Colors.transparent, + borderRadius: BorderRadius.circular(20), + border: Border.all(color: const Color(0xFFDBDBDB), width: 1), + ), child: Center(child: child), ), ),