Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pfe master fixed #1041

Draft
wants to merge 27 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
831c2d0
Split widgets in others files
AntoineLemelin Jul 4, 2024
54cb079
Feature first, test
Ken-ETS Jul 8, 2024
9cd8769
test
Ken-ETS Jul 8, 2024
276822e
Pfe master f3.1 (#1003)
charlcl180 Jul 9, 2024
b17b634
gitignore update
Ken-ETS Jul 12, 2024
2a04a27
Fix errors
XavierPaquet-Rapold Jul 12, 2024
d70f9de
Remove.mocks.dart
XavierPaquet-Rapold Jul 12, 2024
97f6ec9
Merge remote-tracking branch 'origin/PFE-Master2-FE2.3' into PFE-Mast…
XavierPaquet-Rapold Jul 12, 2024
b536ca9
Fix gitignore
XavierPaquet-Rapold Jul 12, 2024
c5d0a90
Fix gitignore
XavierPaquet-Rapold Jul 12, 2024
ea63909
Merge branch 'PFE-master2' of https://github.com/ApplETS/Notre-Dame i…
Hzdotexe Jul 14, 2024
f17f3f3
fix imports duplicates
Hzdotexe Jul 14, 2024
8af1cb7
Merge branch 'master' into PFE-Master2-FE2.3
Ken-ETS Jul 15, 2024
f688054
update
Ken-ETS Jul 15, 2024
d7ee3e2
remove app_widget_service
Ken-ETS Jul 15, 2024
0937336
reorganize new tests to fite feature-first structure
Ken-ETS Jul 16, 2024
8caed33
update
Ken-ETS Jul 16, 2024
590ed16
Merge branch 'master' into PFE-Master2-FE2.3
Hzdotexe Jul 17, 2024
ed8e78f
Fixed the last branch
AntoineLemelin Jul 29, 2024
f5fd9be
Update pubspec and ios pt1
FelixMasse Aug 1, 2024
434a3b1
Use recommended settings ios
FelixMasse Aug 1, 2024
325698f
Update pubspec pt2
FelixMasse Aug 1, 2024
5e4aa1c
Rollback LastUpgradeVersion
FelixMasse Aug 2, 2024
bb02197
test-fix
Ken-ETS Aug 7, 2024
967c017
Fix tests imports
XavierPaquet-Rapold Aug 10, 2024
52814ce
Merge branch 'master' into PFE-Master-Fixed
XavierPaquet-Rapold Aug 11, 2024
6cd1c9e
Downgrade share plus
XavierPaquet-Rapold Aug 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ app_untranslated_messages.yaml

# Flutter test
test/**/failures/
test/mock/**/*.mocks.dart
*.mocks.dart

# Certificates and secrets
assets/certificates/
Expand Down
2 changes: 1 addition & 1 deletion analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ linter:
analyzer:
exclude:
- "lib/generated"
- "test/mock/services/*.mocks.dart"
- "*.mocks.dart"
6 changes: 3 additions & 3 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -329,14 +329,14 @@ SPEC CHECKSUMS:
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
PromisesSwift: 9d77319bbe72ebf6d872900551f7eeba9bce2851
rive_common: c537b4eed761e903a9403d93c347b69bd7a4762f
share_plus: 056a1e8ac890df3e33cb503afffaf1e9b4fbae68
rive_common: cbbac3192af00d7341f19dae2f26298e9e37d99e
share_plus: c3fef564749587fc939ef86ffb283ceac0baf9f5
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
sqflite: 673a0e54cc04b7d6dba8d24fb8095b31c3a99eec
SwiftyXMLParser: 027d9e6fb54a38d95dccec025bcea9693f699c47
Toast: 1f5ea13423a1e6674c4abdac5be53587ae481c4e
url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
webview_flutter_wkwebview: be0f0d33777f1bfd0c9fdcb594786704dbf65f36
webview_flutter_wkwebview: 2a23822e9039b7b1bc52e5add778e5d89ad488d1

PODFILE CHECKSUM: 18f1615a0bcd417392c9107b3e8dc59c76a68dac

Expand Down
7 changes: 7 additions & 0 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = YES;
LastSwiftUpdateCheck = 1400;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
Expand Down Expand Up @@ -783,6 +784,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand All @@ -793,6 +795,7 @@
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
Expand Down Expand Up @@ -864,6 +867,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand All @@ -874,6 +878,7 @@
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
Expand Down Expand Up @@ -919,6 +924,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand All @@ -929,6 +935,7 @@
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
Expand Down
169 changes: 54 additions & 115 deletions lib/features/app/error/outage/outage_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,131 +3,70 @@ import 'package:flutter/material.dart';

// Package imports:
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:notredame/features/app/error/outage/widgets/outage_build_image.dart';
import 'package:notredame/features/app/error/outage/widgets/outage_build_social_media.dart';
import 'package:stacked/stacked.dart';

// Project imports:
import 'package:notredame/constants/urls.dart';
import 'package:notredame/utils/utils.dart';
import 'package:notredame/features/app/error/outage/outage_viewmodel.dart';
import 'package:notredame/utils/app_theme.dart';
import 'package:notredame/utils/utils.dart';

class OutageView extends StatelessWidget {
@override
Widget build(BuildContext context) => ViewModelBuilder<
OutageViewModel>.nonReactive(
viewModelBuilder: () => OutageViewModel(),
builder: (context, model, child) => Scaffold(
backgroundColor: Utils.getColorByBrightness(
context, AppTheme.etsLightRed, AppTheme.primaryDark),
body: Stack(
children: [
SafeArea(
minimum: const EdgeInsets.all(20),
child: Column(
children: <Widget>[
SizedBox(
height: model.getImagePlacement(context),
),
Hero(
tag: 'ets_logo',
child: Image.asset(
"assets/animations/outage.gif",
excludeFromSemantics: true,
width: 500,
color:
Theme.of(context).brightness == Brightness.light
? Colors.white
: AppTheme.etsLightRed,
)),
const SizedBox(
height: 15,
),
SizedBox(height: model.getTextPlacement(context)),
Text(
AppIntl.of(context)!.service_outage,
textAlign: TextAlign.center,
style:
const TextStyle(fontSize: 18, color: Colors.white),
),
SizedBox(height: model.getButtonPlacement(context)),
ElevatedButton(
onPressed: () {
model.tapRefreshButton(context);
},
child: Text(
AppIntl.of(context)!.service_outage_refresh,
style: const TextStyle(fontSize: 17),
),
),
Expanded(
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
children: [
SizedBox(
height: model.getContactTextPlacement(context),
child: Text(
AppIntl.of(context)!.service_outage_contact,
textAlign: TextAlign.center,
style: const TextStyle(color: Colors.white),
),
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
IconButton(
icon: const FaIcon(
FontAwesomeIcons.earthAmericas,
color: Colors.white,
),
onPressed: () => Utils.launchURL(
Urls.clubWebsite,
AppIntl.of(context)!)),
IconButton(
icon: const FaIcon(
FontAwesomeIcons.github,
color: Colors.white,
),
onPressed: () => Utils.launchURL(
Urls.clubGithub, AppIntl.of(context)!)),
IconButton(
icon: const FaIcon(
Icons.mail_outline,
color: Colors.white,
),
onPressed: () => Utils.launchURL(
Urls.clubEmail, AppIntl.of(context)!)),
IconButton(
icon: const FaIcon(
FontAwesomeIcons.discord,
color: Colors.white,
),
onPressed: () => Utils.launchURL(
Urls.clubDiscord,
AppIntl.of(context)!)),
],
Widget build(BuildContext context) =>
ViewModelBuilder<OutageViewModel>.nonReactive(
viewModelBuilder: () => OutageViewModel(),
builder: (context, model, child) => Scaffold(
backgroundColor: Utils.getColorByBrightness(
context, AppTheme.etsLightRed, AppTheme.primaryDark),
body: Stack(
children: [
SafeArea(
minimum: const EdgeInsets.all(20),
child: Column(
children: <Widget>[
SizedBox(
height: model.getImagePlacement(context),
),
outageImageSection(context),
SizedBox(height: model.getTextPlacement(context)),
Text(
AppIntl.of(context)!.service_outage,
textAlign: TextAlign.center,
style: const TextStyle(
fontSize: 18, color: Colors.white),
),
SizedBox(height: model.getButtonPlacement(context)),
ElevatedButton(
onPressed: () {
model.tapRefreshButton(context);
},
child: Text(
AppIntl.of(context)!.service_outage_refresh,
style: const TextStyle(fontSize: 17),
),
],
),
Expanded(
child: outageSocialSection(model, context),
),
],
),
),
SafeArea(
child: Align(
alignment: Alignment.topRight,
child: GestureDetector(
onTap: () => model.triggerTap(context),
child: Container(
width: 60,
height: 60,
color: Colors.transparent,
),
),
),
],
),
)
],
),
SafeArea(
child: Align(
alignment: Alignment.topRight,
child: GestureDetector(
onTap: () => model.triggerTap(context),
child: Container(
width: 60,
height: 60,
color: Colors.transparent,
),
),
),
)
],
),
));
));
}
4 changes: 2 additions & 2 deletions lib/features/app/error/outage/outage_viewmodel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ class OutageViewModel extends BaseViewModel {
}

double getTextPlacement(BuildContext context) {
return MediaQuery.of(context).size.height * 0.20;
return MediaQuery.of(context).size.height * 0.15;
}

double getButtonPlacement(BuildContext context) {
return MediaQuery.of(context).size.height * 0.08;
}

double getContactTextPlacement(BuildContext context) {
return MediaQuery.of(context).size.height * 0.04;
return MediaQuery.of(context).size.height * 0.10;
}

void tapRefreshButton(BuildContext context) {
Expand Down
18 changes: 18 additions & 0 deletions lib/features/app/error/outage/widgets/outage_build_image.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Flutter imports:
import 'package:flutter/material.dart';

// Project imports:
import 'package:notredame/utils/app_theme.dart';

Widget outageImageSection(BuildContext context) {
return Hero(
tag: 'ets_logo',
child: Image.asset(
"assets/animations/outage.gif",
excludeFromSemantics: true,
width: 500,
color: Theme.of(context).brightness == Brightness.light
? Colors.white
: AppTheme.etsLightRed,
));
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
// Flutter imports:
import 'package:flutter/material.dart';

// Package imports:
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';

// Project imports:
import 'package:notredame/constants/urls.dart';
import 'package:notredame/features/app/error/outage/outage_viewmodel.dart';
import 'package:notredame/utils/utils.dart';

Widget outageSocialSection(OutageViewModel model, BuildContext context) {
return Column(
mainAxisAlignment: MainAxisAlignment.end,
children: [
SizedBox(
height: model.getContactTextPlacement(context),
child: Text(
AppIntl.of(context)!.service_outage_contact,
textAlign: TextAlign.center,
style: const TextStyle(color: Colors.white),
),
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
IconButton(
icon: const FaIcon(
FontAwesomeIcons.earthAmericas,
color: Colors.white,
),
onPressed: () =>
Utils.launchURL(Urls.clubWebsite, AppIntl.of(context)!)),
IconButton(
icon: const FaIcon(
FontAwesomeIcons.github,
color: Colors.white,
),
onPressed: () =>
Utils.launchURL(Urls.clubGithub, AppIntl.of(context)!)),
IconButton(
icon: const FaIcon(
Icons.mail_outline,
color: Colors.white,
),
onPressed: () =>
Utils.launchURL(Urls.clubEmail, AppIntl.of(context)!)),
IconButton(
icon: const FaIcon(
FontAwesomeIcons.discord,
color: Colors.white,
),
onPressed: () =>
Utils.launchURL(Urls.clubDiscord, AppIntl.of(context)!)),
],
),
],
);
}
2 changes: 2 additions & 0 deletions lib/features/app/repository/author_repository.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import 'package:notredame/features/ets/events/api-client/hello_api_client.dart';
import 'package:notredame/features/ets/events/api-client/models/organizer.dart';
import 'package:notredame/utils/locator.dart';

// Project imports:

/// Repository to access authors
class AuthorRepository {
static const String tag = "AuthorRepository";
Expand Down
2 changes: 1 addition & 1 deletion lib/features/app/widgets/base_scaffold.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import 'package:flutter_gen/gen_l10n/app_localizations.dart';

// Project imports:
import 'package:notredame/features/app/integration/networking_service.dart';
import 'package:notredame/features/app/widgets/navigation_rail.dart';
import 'package:notredame/features/app/widgets/bottom_bar.dart';
import 'package:notredame/features/app/widgets/navigation_rail.dart';
import 'package:notredame/utils/app_theme.dart';
import 'package:notredame/utils/loading.dart';
import 'package:notredame/utils/locator.dart';
Expand Down
Loading