diff --git a/elaichi/.gitignore b/elaichi/.gitignore index 90de3fa1..cb063cf2 100644 --- a/elaichi/.gitignore +++ b/elaichi/.gitignore @@ -8,6 +8,9 @@ *.aar *.ap_ *.aab +*.jks +key.properties +pubspec.lock # Files for the ART/Dalvik VM *.dex @@ -228,4 +231,4 @@ lib/data/constants/app_env.dart lib/firebase_options.dart -# End of https://www.toptal.com/developers/gitignore/api/dart,flutter,visualstudiocode,android,firebase \ No newline at end of file +# End of https://www.toptal.com/developers/gitignore/api/dart,flutter,visualstudiocode,android,firebase diff --git a/elaichi/lib/data/remote/graphql/queries.dart b/elaichi/lib/data/remote/graphql/queries.dart index 70a44406..36896e15 100644 --- a/elaichi/lib/data/remote/graphql/queries.dart +++ b/elaichi/lib/data/remote/graphql/queries.dart @@ -77,6 +77,7 @@ class Queries { status locationID location { + id name description lat diff --git a/elaichi/lib/presentation/core/utils/strings.dart b/elaichi/lib/presentation/core/utils/strings.dart index fa98a4d6..0c6f13e9 100644 --- a/elaichi/lib/presentation/core/utils/strings.dart +++ b/elaichi/lib/presentation/core/utils/strings.dart @@ -20,7 +20,7 @@ abstract class Strings { static const String festLogo = 'assets/icons/fest_icon.svg'; static const String zimbraCardText = - 'Verify your NITR webmail to access \ntime table, mess menu and much more'; + 'Verify your NITR webmail to access \nZimbra Mail'; static const String kMmCardTitle = 'A Noble Breakthrough: NIT Rourkela produces alcohol-based sanitizers'; static const String kMmCardImageUri = diff --git a/elaichi/lib/presentation/home/feed/widgets/webmail_card.dart b/elaichi/lib/presentation/home/feed/widgets/webmail_card.dart index 3cf77036..d19b633b 100644 --- a/elaichi/lib/presentation/home/feed/widgets/webmail_card.dart +++ b/elaichi/lib/presentation/home/feed/widgets/webmail_card.dart @@ -87,7 +87,20 @@ class WebMailCard extends StatelessWidget { }, ); } else { - Navigator.pushNamed(context, AppRouter.registrationForm); + showModalBottomSheet( + isScrollControlled: true, + context: context, + builder: (context) => const WebMailLoginBottomSheet(), + shape: const RoundedRectangleBorder( + borderRadius: BorderRadius.vertical( + top: Radius.circular(16), + ), + ), + ).then( + (value) => context + .read() + .add(const FestEvent.webMailLogIn()), + ); } }, child: Text( diff --git a/elaichi/lib/presentation/home/fest/explore/event_details_page.dart b/elaichi/lib/presentation/home/fest/explore/event_details_page.dart index 5734053b..0fda323d 100644 --- a/elaichi/lib/presentation/home/fest/explore/event_details_page.dart +++ b/elaichi/lib/presentation/home/fest/explore/event_details_page.dart @@ -14,6 +14,7 @@ import 'package:elaichi/presentation/home/fest/explore/widgets/registration.dart import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:intl/intl.dart'; +import 'package:url_launcher/url_launcher_string.dart'; class EventDetailsPage extends StatelessWidget { EventDetailsPage({ @@ -135,12 +136,47 @@ class EventDetailsPage extends StatelessWidget { ), ), const SizedBox(height: 4), - Text( - '${event.startDate.day.toString().padLeft(2, '0')} ${format.format(event.startDate)} | ${event.startDate.hour.toString().padLeft(2, '0')}:${event.startDate.minute.toString().padLeft(2, '0')}', - style: interTextTheme.bodyLarge!.copyWith( - color: Colors.white.withOpacity(0.6), - fontSize: 14, - ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + '${event.startDate.day.toString().padLeft(2, '0')} ${format.format(event.startDate)} | ${event.startDate.hour.toString().padLeft(2, '0')}:${event.startDate.minute.toString().padLeft(2, '0')}', + style: interTextTheme.bodyLarge!.copyWith( + color: Colors.white.withOpacity(0.6), + fontSize: 14, + ), + ), + InkWell( + onTap: () { + final url = + 'https://www.google.com/maps/search/?api=1&query=${event.location!.lat},${event.location!.long}'; + launchUrlString( + url, + mode: LaunchMode.externalNonBrowserApplication, + ); + }, + child: Row( + children: [ + Icon( + Icons.location_on, + color: Colors.white.withOpacity(0.6), + size: 14, + ), + const SizedBox(width: 2), + Text( + event.location!.name, + style: TextStyle( + fontSize: 14, + fontWeight: FontWeight.bold, + color: Colors.white.withOpacity(0.6), + ), + maxLines: 1, + overflow: TextOverflow.ellipsis, + ), + ], + ), + ), + ], ), const SizedBox(height: 24), if (description.isEmpty) diff --git a/elaichi/lib/presentation/home/fest/explore/widgets/fest_calender.dart b/elaichi/lib/presentation/home/fest/explore/widgets/fest_calender.dart index 3e9e0268..2b73bf77 100644 --- a/elaichi/lib/presentation/home/fest/explore/widgets/fest_calender.dart +++ b/elaichi/lib/presentation/home/fest/explore/widgets/fest_calender.dart @@ -1,19 +1,19 @@ // ignore_for_file: avoid_dynamic_calls - import 'package:elaichi/domain/models/event/event.dart'; import 'package:elaichi/presentation/core/router/app_router.dart'; import 'package:elaichi/presentation/core/theme/base_theme.dart'; import 'package:elaichi/presentation/core/theme/colors.dart'; import 'package:elaichi/presentation/home/fest/explore/widgets/scrolling_text.dart'; import 'package:flutter/material.dart'; +import 'package:url_launcher/url_launcher_string.dart'; class CalenderTabView extends StatelessWidget { const CalenderTabView({ super.key, required TabController tabController, required this.calender, - }) : _tabController = tabController; + }) : _tabController = tabController; final TabController _tabController; final Map> calender; @@ -91,7 +91,7 @@ class CalenderItem extends StatelessWidget { child: Container( margin: const EdgeInsets.only(bottom: 24), constraints: const BoxConstraints(minHeight: 67, maxHeight: 109), - width: 326, + // width: MediaQuery.of(context).size.width, color: AppColors.grey13, padding: const EdgeInsets.all(12), child: Row( @@ -113,16 +113,27 @@ class CalenderItem extends StatelessWidget { ), ), const SizedBox(height: 8), - SizedBox( - width: 200, - child: ScrollingText( - text: event.name, - style: interTextTheme.bodyLarge!.copyWith( - color: Colors.white, - fontWeight: FontWeight.w600, + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + SizedBox( + width: 200, + child: ScrollingText( + text: event.name, + style: interTextTheme.bodyLarge!.copyWith( + color: Colors.white, + fontWeight: FontWeight.w600, + ), + condition: 50, + ), ), - condition: 50, - ), + Text( + '${event.startDate.hour}:${event.startDate.minute.toString().padLeft(2, '0')} - ${event.endDate.hour}:${event.endDate.minute.toString().padLeft(2, '0')}', + style: interTextTheme.labelSmall!.copyWith( + color: AppColors.grey10, + ), + ), + ], ), // if (event.poster != '') const SizedBox(height: 4), // if (event.poster != '' && speakerName != null) @@ -137,28 +148,66 @@ class CalenderItem extends StatelessWidget { const SizedBox(height: 4), if (event.subHeading != '') Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ - const Icon( - Icons.group_work_outlined, - size: 8, - color: AppColors.white1, - ), - const SizedBox(width: 4), - Text( - event.subHeading, - style: interTextTheme.labelSmall! - .copyWith(fontSize: 12, color: AppColors.white1), + SizedBox( + width: 200, + child: Row( + children: [ + const Icon( + Icons.group_work_outlined, + size: 8, + color: AppColors.white1, + ), + const SizedBox(width: 4), + Text( + event.subHeading, + style: interTextTheme.labelSmall!.copyWith( + fontSize: 12, + color: AppColors.white1, + ), + ), + ], + ), ), + GestureDetector( + onTap: () { + final url = + 'https://www.google.com/maps/search/?api=1&query=${event.location!.lat},${event.location!.long}'; + launchUrlString( + url, + mode: LaunchMode.externalNonBrowserApplication, + ); + }, + child: Row( + children: [ + Icon( + Icons.location_on, + color: Colors.white.withOpacity(0.6), + size: 14, + ), + const SizedBox(width: 2), + SizedBox( + width: 80, + child: Text( + event.location!.name, + style: TextStyle( + fontSize: 12, + fontWeight: FontWeight.normal, + color: Colors.white.withOpacity(0.6), + ), + // prevent overflow + maxLines: 1, + overflow: TextOverflow.ellipsis, + ), + ), + ], + ), + ) ], ), ], ), - Text( - '${event.startDate.hour}:${event.startDate.minute.toString().padLeft(2, '0')} - ${event.endDate.hour}:${event.endDate.minute.toString().padLeft(2, '0')}', - style: interTextTheme.labelSmall!.copyWith( - color: AppColors.grey10, - ), - ), ], ), ), diff --git a/elaichi/pubspec.yaml b/elaichi/pubspec.yaml index 4cf4a7d9..475ae654 100644 --- a/elaichi/pubspec.yaml +++ b/elaichi/pubspec.yaml @@ -3,7 +3,7 @@ description: Campus Guide for NIT Rourkela publish_to: 'none' # Remove this line if you wish to publish to pub.dev -version: 1.0.0+1 +version: 1.0.0+3 environment: sdk: ">=2.17.0 <3.0.0"