Skip to content

Commit

Permalink
Corrected some merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Adriano-7 committed Jan 7, 2025
1 parent a0f668c commit 6c98fc8
Show file tree
Hide file tree
Showing 10 changed files with 383 additions and 623 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,14 @@ class CourseUnitsInfoFetcher implements SessionDependantFetcher {
? parseSheet(bestResponse)
: Sheet(
professors: [],
regents: [],
content: '',
evaluation: '',
frequency: '',
books: [],
);
}


Future<List<CourseUnitFileDirectory>> fetchCourseUnitFiles(
Session session,
int occurId,
Expand Down
9 changes: 5 additions & 4 deletions packages/uni_app/lib/generated/intl/messages_all.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ MessageLookupByLibrary? _findExact(String localeName) {
/// User programs should call this before using [localeName] for messages.
Future<bool> initializeMessages(String localeName) async {
var availableLocale = Intl.verifiedLocale(
localeName, (locale) => _deferredLibraries[locale] != null,
onFailure: (_) => null);
localeName,
(locale) => _deferredLibraries[locale] != null,
onFailure: (_) => null);
if (availableLocale == null) {
return new Future.value(false);
}
Expand All @@ -59,8 +60,8 @@ bool _messagesExistFor(String locale) {
}

MessageLookupByLibrary? _findGeneratedMessagesFor(String locale) {
var actualLocale =
Intl.verifiedLocale(locale, _messagesExistFor, onFailure: (_) => null);
var actualLocale = Intl.verifiedLocale(locale, _messagesExistFor,
onFailure: (_) => null);
if (actualLocale == null) return null;
return _findExact(actualLocale);
}
475 changes: 181 additions & 294 deletions packages/uni_app/lib/generated/intl/messages_en.dart

Large diffs are not rendered by default.

477 changes: 181 additions & 296 deletions packages/uni_app/lib/generated/intl/messages_pt_PT.dart

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions packages/uni_app/lib/view/academic_path/academic_path.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import 'package:uni/view/academic_path/exam_page.dart';
import 'package:uni/view/common_widgets/pages_layouts/general/general.dart';
import 'package:uni_ui/icons.dart';
import 'package:uni_ui/tabs/tab_icon.dart';
import 'package:uni/view/academic_path/widgets/course_units_card.dart';

class AcademicPathPageView extends StatefulWidget {
const AcademicPathPageView({super.key});
Expand Down Expand Up @@ -53,13 +54,13 @@ class AcademicPathPageViewState extends GeneralPageViewState
Widget getBody(BuildContext context) {
return TabBarView(
controller: tabController,
children: const [
children: [
Center(
child: Text('To be implemented'),
),
ExamsPage(),
Center(
child: Text('To be implemented'),
child: CourseUnitsCard(),
),
],
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class GenericExpandable extends StatelessWidget {
return ExpandablePanel(
header: Align(
alignment: Alignment.centerLeft,
child: Text(title, style: const TextStyle(fontSize: 20)),
child: Text(title, style: Theme.of(context).textTheme.headlineLarge),
),
collapsed: ShaderMask(
shaderCallback: (bounds) => const LinearGradient(
Expand Down
4 changes: 1 addition & 3 deletions packages/uni_app/lib/view/common_widgets/page_title.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ class PageTitle extends StatelessWidget {
Widget build(BuildContext context) {
final Widget title = Text(
name,
style: Theme.of(context).textTheme.headlineMedium?.copyWith(
color: Theme.of(context).primaryTextTheme.headlineMedium?.color,
),
style: Theme.of(context).textTheme.headlineLarge,
);
return Container(
padding: pad ? const EdgeInsets.fromLTRB(20, 30, 20, 10) : null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ class CourseUnitDetailPageViewState
crossAxisAlignment: CrossAxisAlignment.start,
children: [
TabBar(
// todo : pixel font size might not be the best choice
labelStyle: const TextStyle(fontSize: 12),
tabs: [
TabIcon(icon: UniIcons.notebook, text: S.of(context).course_info),
TabIcon(icon: UniIcons.classes, text: S.of(context).course_class),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class CourseUnitSheetView extends StatelessWidget {
children: [
Text(
S.of(context).instructors,
style: const TextStyle(fontSize: 20),
style: Theme.of(context).textTheme.headlineLarge,
),
if (courseUnitSheet.professors.length <= 4)
_buildInstructorsRow(context, courseUnitSheet.professors)
Expand All @@ -49,12 +49,12 @@ class CourseUnitSheetView extends StatelessWidget {
),
Text(
S.of(context).assessments,
style: const TextStyle(fontSize: 20),
style: Theme.of(context).textTheme.headlineLarge,
),
if (exams.isEmpty)
Padding(
padding: const EdgeInsets.only(top: 8),
child: Text(S.of(context).noExamsScheduled),
child: Text(S.of(context).noExamsScheduled, style: Theme.of(context).textTheme.bodyLarge),
)
else
SizedBox(
Expand Down Expand Up @@ -82,7 +82,7 @@ class CourseUnitSheetView extends StatelessWidget {
),
Text(
S.of(context).bibliography,
style: const TextStyle(fontSize: 20),
style: Theme.of(context).textTheme.headlineLarge,
),
_buildBooksRow(context, courseUnitSheet.books),
],
Expand Down Expand Up @@ -132,10 +132,7 @@ class CourseUnitSheetView extends StatelessWidget {
const SizedBox(width: 8),
Text(
S.of(context).moreInstructors(remaining.length),
style: const TextStyle(
fontSize: 14,
fontWeight: FontWeight.w500,
),
style: Theme.of(context).textTheme.bodyLarge,
),
],
),
Expand Down Expand Up @@ -184,18 +181,15 @@ class CourseUnitSheetView extends StatelessWidget {
width: 100,
child: Text(
instructor.name,
style: const TextStyle(
fontSize: 14,
fontWeight: FontWeight.w500,
),
style: Theme.of(context).textTheme.titleMedium,
overflow: TextOverflow.ellipsis,
),
),
Text(
instructor.isRegent
? S.of(context).courseRegent
: S.of(context).instructor,
style: const TextStyle(fontSize: 12, color: Colors.grey),
style: Theme.of(context).textTheme.labelLarge,
),
],
),
Expand Down Expand Up @@ -269,6 +263,7 @@ class CourseUnitSheetView extends StatelessWidget {
child: Text(
book.title,
textAlign: TextAlign.center,
style: Theme.of(context).textTheme.bodyLarge,
),
),
],
Expand All @@ -292,6 +287,7 @@ class CourseUnitSheetView extends StatelessWidget {
GenericExpandable(
content: HtmlWidget(
sectionContent != 'null' ? sectionContent : S.of(context).no_info,
textStyle: Theme.of(context).textTheme.bodyLarge,
),
title: sectionTitle,
),
Expand Down
7 changes: 0 additions & 7 deletions packages/uni_ui/lib/cards/exam_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,6 @@ class ExamCard extends StatelessWidget {
'EE': BadgeColors.ee,
};

static const Map<String, Color> examTypeColors = {
'MT': BadgeColors.mt,
'EN': BadgeColors.en,
'ER': BadgeColors.er,
'EE': BadgeColors.ee,
};

@override
Widget build(BuildContext context) {
return Opacity(
Expand Down

0 comments on commit 6c98fc8

Please sign in to comment.