diff --git a/lib/presentation/pages/profile/about_app_page.dart b/lib/presentation/pages/profile/about_app_page.dart index 65a155bf..32885c77 100644 --- a/lib/presentation/pages/profile/about_app_page.dart +++ b/lib/presentation/pages/profile/about_app_page.dart @@ -171,7 +171,26 @@ class AboutAppPage extends StatelessWidget { const SizedBox(height: 24), Padding( padding: const EdgeInsets.symmetric(horizontal: 24), - child: Text('Спонсоры 💜', style: AppTextStyle.h6), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text('Спонсоры 💜', style: AppTextStyle.h6), + TextButton( + onPressed: () { + launchUrlString( + 'https://boosty.to/oniel', + mode: LaunchMode.externalApplication, + ); + }, + child: Text( + 'Стать спонсором', + style: AppTextStyle.buttonS.copyWith( + color: AppTheme.colors.primary, + ), + ), + ), + ], + ), ), const SizedBox(height: 16), const Padding( diff --git a/lib/schedule/view/schedule_page.dart b/lib/schedule/view/schedule_page.dart index 59061d24..ea9e9a3c 100644 --- a/lib/schedule/view/schedule_page.dart +++ b/lib/schedule/view/schedule_page.dart @@ -99,9 +99,11 @@ class _SchedulePageState extends State { body: EventsPageView( controller: _schedulePageController, itemBuilder: (context, index) { + final day = + Calendar.firstCalendarDay.add(Duration(days: index)); final schedules = Calendar.getSchedulePartsByDay( schedule: state.selectedSchedule?.schedule ?? [], - day: Calendar.firstCalendarDay.add(Duration(days: index)), + day: day, ); final holiday = schedules.firstWhereOrNull( @@ -113,6 +115,10 @@ class _SchedulePageState extends State { title: (holiday as HolidaySchedulePart).title); } + if (day.weekday == DateTime.sunday) { + return const HolidayPage(title: 'Выходной'); + } + final lessons = schedules.whereType().toList(); diff --git a/lib/schedule/widgets/calendar.dart b/lib/schedule/widgets/calendar.dart index 44dc299f..3a8b36e6 100644 --- a/lib/schedule/widgets/calendar.dart +++ b/lib/schedule/widgets/calendar.dart @@ -207,8 +207,8 @@ class _CalendarState extends State { _selectedWeek = currentNewWeek; _selectedDay = selectedDay; _focusedDay = Calendar.getDayInAvailableRange(focusedDay); + _selectedPage = Calendar.getPageIndex(_selectedDay); }); - _selectedPage = Calendar.getPageIndex(_selectedDay); if (widget.pageViewController.hasClients) { widget.pageViewController.jumpToPage(_selectedPage); } @@ -235,10 +235,10 @@ class _CalendarState extends State { _selectedDay = currentDate; _selectedWeek = CalendarUtils.getCurrentWeek( mCurrentDate: _selectedDay); + _selectedPage = Calendar.getPageIndex(_selectedDay); }); - _selectedPage = Calendar.getPageIndex(_selectedDay); if (widget.pageViewController.hasClients) { - widget.pageViewController.jumpToPage(_selectedPage); + widget.pageViewController.jumpToPage(_selectedPage - 1); } } }, diff --git a/lib/sponsors/view/sponsors_view.dart b/lib/sponsors/view/sponsors_view.dart index f520dd52..57664f10 100644 --- a/lib/sponsors/view/sponsors_view.dart +++ b/lib/sponsors/view/sponsors_view.dart @@ -1,6 +1,6 @@ - import 'package:community_repository/community_repository.dart'; import 'package:flutter/material.dart'; +import 'package:flutter_animate/flutter_animate.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:rtu_mirea_app/sponsors/sponsors.dart'; @@ -52,7 +52,7 @@ class _SponsorsView extends StatelessWidget { return SponsorCard(sponsor: sponsor); }, - ), + ).animate(interval: 80.ms).fade(duration: 200.ms), ); } else { return const SizedBox.shrink(); diff --git a/pubspec.yaml b/pubspec.yaml index a20f3a49..58784135 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -12,7 +12,7 @@ publish_to: 'none' # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.4.1+44 +version: 1.4.1+45 environment: sdk: ">=3.1.1"