From 1178525a93c0ad4e7cc0165ffd477b7232b359fa Mon Sep 17 00:00:00 2001 From: mso7nueh Date: Fri, 25 Apr 2025 11:03:52 +0300 Subject: [PATCH] =?UTF-8?q?fix(feed):=20=D0=BF=D0=BE=D0=BA=D0=B0=D0=B7?= =?UTF-8?q?=D0=B0=D1=82=D1=8C=20=D0=B5=D1=89=D1=91=20(338),=20=D0=BA=D0=BE?= =?UTF-8?q?=D0=BC=D0=BC=D0=B5=D0=BD=D1=82=D0=B0=D1=80=D0=B8=D0=B8=20(325),?= =?UTF-8?q?=20=D0=BF=D0=B5=D1=80=D0=B5=D1=85=D0=BE=D0=B4=20=D0=B2=20=D0=BF?= =?UTF-8?q?=D1=80=D0=BE=D1=84=D0=B8=D0=BB=D1=8C=20(317)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/core/const.dart | 4 +- .../presentation/widgets/author_card.dart | 127 +++++++++--------- .../presentation/widgets/comments_widget.dart | 1 + .../presentation/widgets/diets_widget.dart | 13 ++ .../presentation/widgets/plan_widget.dart | 13 ++ .../presentation/widgets/recipes_widget.dart | 2 +- 6 files changed, 95 insertions(+), 65 deletions(-) diff --git a/lib/core/const.dart b/lib/core/const.dart index 4f38a54e..31c47e9c 100644 --- a/lib/core/const.dart +++ b/lib/core/const.dart @@ -1,5 +1,5 @@ -// String baseUrl = 'https://eatvio.ru'; -String baseUrl = 'https://dev2.eatvio.com'; +String baseUrl = 'https://eatvio.ru'; +// String baseUrl = 'https://dev2.eatvio.com'; const List durationValues = [7, 14, 21]; diff --git a/lib/features/diets/presentation/widgets/author_card.dart b/lib/features/diets/presentation/widgets/author_card.dart index 9e00d1dd..c1113f93 100644 --- a/lib/features/diets/presentation/widgets/author_card.dart +++ b/lib/features/diets/presentation/widgets/author_card.dart @@ -12,75 +12,78 @@ class AuthorCard extends StatelessWidget { final String title; final Color? backgroundColor; final TextStyle? titleStyle; + @override Widget build(BuildContext context) { - return Container( - width: MediaQuery.sizeOf(context).width, - decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: backgroundColor ?? appTheme.cardBackground), - child: Stack( - children: [ - Padding( - padding: const EdgeInsets.only(left: 16, top: 16, bottom: 24), - child: Column( - children: [ - ListTile( - contentPadding: EdgeInsets.zero, - leading: Container( - width: 64, - height: 64, - decoration: BoxDecoration( - shape: BoxShape.circle, - image: DecorationImage( - image: NetworkImage(author.authorProfileIcon), - fit: BoxFit.cover, + return GestureDetector( + onTap: () { + GoRouter.of(context).pushNamed('profileScreen', extra: author); + }, + child: Container( + width: MediaQuery.sizeOf(context).width, + decoration: BoxDecoration(borderRadius: BorderRadius.circular(12), color: backgroundColor ?? appTheme.cardBackground), + child: Stack( + children: [ + Padding( + padding: const EdgeInsets.only(left: 16, top: 16, bottom: 24), + child: Column( + children: [ + ListTile( + contentPadding: EdgeInsets.zero, + leading: Container( + width: 64, + height: 64, + decoration: BoxDecoration( + shape: BoxShape.circle, + image: DecorationImage( + image: NetworkImage(author.authorProfileIcon), + fit: BoxFit.cover, + ), ), ), - ), - subtitle: Text( - author.authorName, - style: TextStyles.textLSemibold.copyWith( - color: appTheme.black, - ), - ), - title: Text( - title, - style: titleStyle ?? TextStyles.textSSemibold.copyWith( - color: appTheme.gray, - ), - ), - ), - Row( - children: [ - Text( - 'Консультант', - style: TextStyles.textMMedium.copyWith( + subtitle: Text( + author.authorName, + style: TextStyles.textLSemibold.copyWith( color: appTheme.black, ), ), - const SizedBox(width: 10), - if (author.authorPlaceInRating != null) - InfoBouble( - radius: 12, - backgroundColor: appTheme.whiteA700, - children: [ - Text( - '${author.authorPlaceInRating}-й в рейтинге', - style: TextStyles.textMMediumAuto.copyWith( - color: appTheme.blueA400, - ), - ), - ], + title: Text( + title, + style: titleStyle ?? TextStyles.textSSemibold.copyWith( + color: appTheme.gray, ), - ], - ), - ], + ), + ), + Row( + children: [ + Text( + 'Консультант', + style: TextStyles.textMMedium.copyWith( + color: appTheme.black, + ), + ), + const SizedBox(width: 10), + if (author.authorPlaceInRating != null) + InfoBouble( + radius: 12, + backgroundColor: appTheme.whiteA700, + children: [ + Text( + '${author.authorPlaceInRating}-й в рейтинге', + style: TextStyles.textMMediumAuto.copyWith( + color: appTheme.blueA400, + ), + ), + ], + ), + ], + ), + ], + ), ), - ), - Positioned( - right: 8, - top: 8, - child: GestureDetector( - onTap: () => GoRouter.of(context).pushNamed('profileScreen', extra: author), + Positioned( + right: 8, + top: 8, child: Container( width: 28, height: 28, @@ -98,8 +101,8 @@ class AuthorCard extends StatelessWidget { ), ), ), - ), - ], + ], + ), ), ); } diff --git a/lib/features/feed/presentation/widgets/comments_widget.dart b/lib/features/feed/presentation/widgets/comments_widget.dart index 109bfb91..784a77c5 100644 --- a/lib/features/feed/presentation/widgets/comments_widget.dart +++ b/lib/features/feed/presentation/widgets/comments_widget.dart @@ -42,6 +42,7 @@ class _CommentsWidgetState extends State { ), const SizedBox(height: 8), ], + const SizedBox(height: 48), ], ); } diff --git a/lib/features/feed/presentation/widgets/diets_widget.dart b/lib/features/feed/presentation/widgets/diets_widget.dart index ef406b3b..fa9dce69 100644 --- a/lib/features/feed/presentation/widgets/diets_widget.dart +++ b/lib/features/feed/presentation/widgets/diets_widget.dart @@ -153,6 +153,19 @@ class _DietsWidgetState extends State { ), ), ], + if (widget.diet.details.length > 200) + const Padding( + padding: EdgeInsets.only(left: 16, top: 8), + child: Text( + 'Показать ещё', + style: TextStyle( + height: 1, + color: Color(0xFF8B8B8B), + fontSize: 14, + fontWeight: FontWeight.w600, + ), + ), + ), ], ), Padding( diff --git a/lib/features/feed/presentation/widgets/plan_widget.dart b/lib/features/feed/presentation/widgets/plan_widget.dart index 56fcd4e5..2951d90a 100644 --- a/lib/features/feed/presentation/widgets/plan_widget.dart +++ b/lib/features/feed/presentation/widgets/plan_widget.dart @@ -156,6 +156,19 @@ class _PlanWidgetState extends State { }, ), ), + if (widget.plan.details.length > 200) + const Padding( + padding: EdgeInsets.only(left: 16, top: 8), + child: Text( + 'Показать ещё', + style: TextStyle( + height: 1, + color: Color(0xFF8B8B8B), + fontSize: 14, + fontWeight: FontWeight.w600, + ), + ), + ), ], ], ), diff --git a/lib/features/feed/presentation/widgets/recipes_widget.dart b/lib/features/feed/presentation/widgets/recipes_widget.dart index 8d51da7c..2a586190 100644 --- a/lib/features/feed/presentation/widgets/recipes_widget.dart +++ b/lib/features/feed/presentation/widgets/recipes_widget.dart @@ -187,7 +187,7 @@ class _RecipesWidgetState extends State { ), if (widget.recipe.description.length > 200) const Padding( - padding: EdgeInsets.symmetric(horizontal: 12), + padding: EdgeInsets.only(left: 16, top: 8), child: Text( 'Показать ещё', style: TextStyle(