Skip to content

Commit

Permalink
March 2023 release (#1179)
Browse files Browse the repository at this point in the history
  • Loading branch information
bdmendes authored Mar 4, 2024
2 parents 9b7e111 + 0f32197 commit e2e949f
Show file tree
Hide file tree
Showing 206 changed files with 7,355 additions and 3,756 deletions.
7 changes: 5 additions & 2 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
version: 2

enable-beta-ecosystems: true
updates:
- package-ecosystem: "pub"
directory: "/uni"
schedule:
interval: "weekly"
interval: "daily"
ignore:
- dependency-name: "*"
update-types: ["version-update:semver-patch"]

2 changes: 1 addition & 1 deletion pre-commit-hook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ mkdir -p .git/hooks #it seems that are some cases where git will not create a ho
tee .git/hooks/pre-commit << EOF
#!/bin/sh
FILES="\$(git diff --name-only --cached | grep .*\.dart | grep -v .*\.g\.dart | grep -v .*\.mocks\.dart)"
FILES="\$(git diff --diff-filter=d --name-only --cached | grep .*\.dart | grep -v .*\.g\.dart | grep -v .*\.mocks\.dart)"
[ -z "\$FILES" ] && exit 0
Expand Down
3 changes: 3 additions & 0 deletions uni/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,6 @@ app.*.symbols
!**/ios/**/default.perspectivev3
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
!/dev/ci/**/Gemfile.lock

# Flutter Devtools
devtools_options.yaml
30 changes: 30 additions & 0 deletions uni/.metadata
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled.

version:
revision: f468f3366c26a5092eb964a230ce7892fda8f2f8
channel: unknown

project_type: app

# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8
base_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8
- platform: ios
create_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8
base_revision: f468f3366c26a5092eb964a230ce7892fda8f2f8

# User provided section

# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'
2 changes: 1 addition & 1 deletion uni/app_version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.7.22+235
1.8.0-beta.19+252
3 changes: 3 additions & 0 deletions uni/assets/env/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Plausbile
PLAUSIBLE_URL=https://plausible.example.com
PLAUSIBLE_DOMAIN=your.plausible.domain
Binary file added uni/assets/images/no_wifi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
138 changes: 114 additions & 24 deletions uni/assets/text/TermsAndConditions.md
Original file line number Diff line number Diff line change
@@ -1,53 +1,143 @@
# App desenvolvida pelo NIAEFEUP.

# De estudantes, para estudantes.
\
\
**Terms and conditions**

These terms and conditions ("Terms", "Agreement") are an agreement between NIAEFEUP ("us", "we" or "our"), Núcleo de Informática da Associação de Estudantes da Universidade do Porto, and you ("User", "you" or "your"). This Agreement sets forth the general terms and conditions of your use of the uni mobile application and any of its products or services (collectively, "Mobile Application" or "Services").
\
\
**Accounts and membership**
**Terms and Conditions**

To use the Mobile Application, you are required to hold a digital account provided by Universidade do Porto. We are in no way affiliated with this university. Any act performed by you through the Mobile Application is subject to the [Universidade do Porto's terms and conditions](https://sigarra.up.pt/up/pt/web_base.gera_pagina?p_pagina=termos%20e%20condicoes).
By using your faculty account in the Mobile Application, you are responsible for maintaining the security of your account and you are fully responsible for all activities that occur under the account and any other actions taken in connection with it. We will not be liable for any acts or omissions by you, including any damages of any kind incurred as a result of such acts or omissions.
Any interaction with your data from Universidade do Porto's platform is made directly through it, and is not collected by us in any way.
If you choose to select the option to keep you logged in, you understand that your sign-in details may be stored locally, but not in any way shared with us. These details are stored in the application data and we hold no responsibility for ensuring their concealment.
These terms and conditions ("Terms", "Agreement") are an agreement between NIAEFEUP ("us", "we" or "
our"), Núcleo de Informática da Associação de Estudantes da Universidade do Porto, and you ("
User", "you" or "your"). This Agreement sets forth the general terms and conditions of your use of
the Uni Mobile Application and any of its products or services (collectively, "Mobile Application"
or "Services").
\
\
**User content**
**Accounts and Membership**

We do not own any data, information or material ("Content") that you submit in the Mobile Application in the course of using the Service. You shall have sole responsibility for the accuracy, quality, integrity, legality, reliability, appropriateness, and intellectual property ownership or right to use of all submitted Content. We may, but have no obligation to, monitor and review Content in the Mobile Application submitted or created using our Services by you. Unless specifically permitted by you, your use of the Mobile Application does not grant us the license to use, reproduce, adapt, modify, publish or distribute the Content created by you or stored in your user account for commercial, marketing or any similar purpose. But you grant us permission to access, copy, distribute, store, transmit, reformat, display and perform the Content of your user account solely as required for the purpose of providing the Services to you. Without limiting any of those representations or warranties, we have the right, though not the obligation, to, in our own sole discretion, refuse or remove any Content that, in our reasonable opinion, violates any of our policies or is in any way harmful or objectionable.
To use the Uni Mobile Application, you are required to hold a digital account provided by
Universidade
do Porto. We are in no way affiliated with this university. Any act performed by you through the
mobile application is subject to
the [Universidade do Porto's terms and conditions](https://sigarra.up.pt/up/pt/web_base.gera_pagina?p_pagina=termos%20e%20condicoes).
By using your faculty account in the Mobile Application, you are responsible for maintaining the
security of your account and you are fully responsible for all activities that occur under the
account and any other actions taken in connection with it. We will not be liable for any acts or
omissions by you, including any damages of any kind incurred as a result of such acts or omissions.
Any interaction with your data from Universidade do Porto's platform is made directly through it,
and is not collected by us in any way.
If you choose to select the option to keep you logged in, you understand that your sign-in details
may be stored locally, but not in any way shared with us. These details are stored in the
application data and we hold no responsibility for ensuring their concealment.
\
\
**Ownership of Content**

We do not own any data, information or material ("Content") that you submit in the Mobile
Application in the course of using the Service. You shall have sole responsibility for the accuracy,
quality, integrity, legality, reliability, appropriateness, and intellectual property ownership or
right to use of all submitted Content.
\
\
**Backups**
**Data usage, Monitoring and Privacy**

We are not responsible for Content residing in the Mobile Application. In no event shall we be held liable for any loss of any Content. It is your sole responsibility to maintain appropriate backup of your Content.
We may, at our discretion but with no obligation, monitor and review Content in the Mobile
Application submitted or created using our Services by you.
Personal data of users is not collected for any other purpose, unless providing the Services to you,
except in certain circumstances described
in [Play Store’s Privacy Policy](https://support.google.com/googleplay/android-developer/answer/10144311?visit_id=638365485539535125-3072678242&rd=1)
and [App Store's Privacy Policy](https://developer.apple.com/app-store/app-privacy-details/#user-tracking).
\
\
**Links to other mobile applications**
**License and Usage Restrictions:**

Although this Mobile Application may link to other mobile applications, we are not, directly or indirectly, implying any approval, association, sponsorship, endorsement, or affiliation with any linked mobile application, unless specifically stated herein. Some of the links in the Mobile Application may be "affiliate links". This means if you click on the link and purchase an item, NIAEFEUP will receive an affiliate commission. We are not responsible for examining or evaluating, and we do not warrant the offerings of, any businesses or individuals or the content of their mobile applications. We do not assume any responsibility or liability for the actions, products, services, and content of any other third-parties. You should carefully review the legal statements and other conditions of use of any mobile application which you access through a link from this Mobile Application. Your linking to any other off-site mobile applications is at your own risk.
You grant us permission to access, copy, distribute, store, transmit, reformat, display and perform
the Content of your user account solely as required for the purpose of providing the Services to
you.
Unless specifically permitted by you, your use of the Mobile Application does not grant us the
license to link, reproduce, adapt, modify, publish or distribute the Content created by you or
stored in your user account, for evaluating the effectiveness of existing product features, planning
new features, or measuring size and characteristics about specific end-users, or devices with a data
broker, for commercial, marketing or any similar purpose.
Unless specifically permitted by you, your
use of the Mobile Application does not grant us the
license to use analytics tools, advertising networks, third-party SDKs, or other external vendors
whose code we have added to the Uni Mobile Application, to collect information such as user ID,
device ID, or profiles with Third-Party Data for the purpose of accessing necessary data to
implement
the Services we provide. We anonymously track page visits and widget clicks, which is shared with
our self-hosted instance of [plausible analytics](https://plausible.niaefeup.pt/).
we do not have the license to sell or share sensitive data collected with the purpose of
facilitating sales.
\
\
**Content Removal:**

Without limiting any of those representations or warranties, we have the right, though not the
obligation, to, in our own sole discretion, refuse or remove any content that, in our reasonable
opinion, violates any of our policies or is in any way harmful or objectionable.
\
\
**Limitation of liability**
**Backups**

To the fullest extent permitted by applicable law, in no event will NIAEFEUP, its affiliates, officers, directors, employees, agents, suppliers or licensors be liable to any person for (a): any indirect, incidental, special, punitive, cover or consequential damages (including, without limitation, damages for lost profits, revenue, sales, goodwill, use of content, impact on business, business interruption, loss of anticipated savings, loss of business opportunity) however caused, under any theory of liability, including, without limitation, contract, tort, warranty, breach of statutory duty, negligence or otherwise, even if NIAEFEUP has been advised as to the possibility of such damages or could have foreseen such damages. To the maximum extent permitted by applicable law, the aggregate liability of NIAEFEUP and its affiliates, officers, employees, agents, suppliers and licensors, relating to the services will be limited to an amount greater of one dollar or any amounts actually paid in cash by you to NIAEFEUP for the prior one month period prior to the first event or occurrence giving rise to such liability. The limitations and exclusions also apply if this remedy does not fully compensate you for any losses or fails of its essential purpose.
We are not responsible for Content residing in the Mobile Application. In no event shall we be held
liable for any loss of any Content. It is your sole responsibility to maintain appropriate backup of
your Content.
\
\
**Changes and amendments**
**Links to Other Mobile Applications**

Although this Mobile Application may link to other mobile applications, we are not, directly or
indirectly, implying any approval, association, sponsorship, endorsement, or affiliation with any
linked mobile application, unless specifically stated herein. Some of the links in the Mobile
Application may be "affiliate links". This means if you click on the link and purchase an item,
NIAEFEUP will receive an affiliate commission. We are not responsible for examining or evaluating,
and we do not warrant the offerings of, any businesses or individuals or the content of their mobile
applications. We do not assume any responsibility or liability for the actions, products, Services,
and Content of any other Third-Parties. You should carefully review the legal statements and other
conditions of use of any Mobile Application which you access through a link from this Mobile
Application. Your linking to any other off-site Mobile Applications is at your own risk.
\
\
**Limitation of Liability**

To the fullest extent permitted by applicable law, in no event will NIAEFEUP, its affiliates,
officers, directors, employees, agents, suppliers or licensors be liable to any person for (a): any
indirect, incidental, special, punitive, cover or consequential damages (including, without
limitation, damages for lost profits, revenue, sales, goodwill, use of content, impact on business,
business interruption, loss of anticipated savings, loss of business opportunity) however caused,
under any theory of liability, including, without limitation, contract, tort, warranty, breach of
statutory duty, negligence or otherwise, even if NIAEFEUP has been advised as to the possibility of
such damages or could have foreseen such damages. To the maximum extent permitted by applicable law,
the aggregate liability of NIAEFEUP and its affiliates, officers, employees, agents, suppliers and
licensors, relating to the services will be limited to an amount greater of one dollar or any
amounts actually paid in cash by you to NIAEFEUP for the prior one month period prior to the first
event or occurrence giving rise to such liability. The limitations and exclusions also apply if this
remedy does not fully compensate you for any losses or fails of its essential purpose.
\
\
**Changes and Amendments**

We reserve the right to modify this Agreement or its policies relating to the Mobile Application or Services at any time, effective upon posting of an updated version of this Agreement in the Mobile Application. When we do, we will revise the updated date at the bottom of this page. Continued use of the Mobile Application after any such changes shall constitute your consent to such changes. Policy was created with [Website Policies](https://www.websitepolicies.com).
We reserve the right to modify this Agreement or its policies relating to the Mobile Application or
services at any time, effective upon posting of an updated version of this Agreement in the Mobile
Application. When we do, we will revise the updated date at the bottom of this page. Continued use
of the Mobile Application after any such changes will only constitute if, when prompted, you consent
to them. Otherwise, you will be logged out of the Mobile Application.
This policy was created with [Website Policies](https://www.websitepolicies.com).
\
\
**Acceptance of these terms**
**Acceptance of These Terms**

You acknowledge that you have read this Agreement and agree to all its terms and conditions. By using the Mobile Application or its Services you agree to be bound by this Agreement. If you do not agree to abide by the terms of this Agreement, you are not authorized to use or access the Mobile Application and its Services.
You acknowledge that you have read this Agreement and agree to all its terms and conditions. By
using the Mobile Application or its Services you agree to be bound by this Agreement. If you do not
agree to abide by the terms of this Agreement, you are not authorized to use or access the Mobile
Application and its Services.
\
\
**Contacting us**
**Contacting Us**

If you would like to contact us to understand more about this Agreement or wish to contact us concerning any matter relating to it, you may send an email to [ni@aefeup.pt](mailto:ni@aefeup.pt).
If you would like to contact us to understand more about this Agreement or wish to contact us
concerning any matter relating to it, you may send an email to [ni@aefeup.pt](mailto:ni@aefeup.pt).
\
\
This document was last updated on February 25, 2021
This document was last updated on February 28, 2023.
23 changes: 23 additions & 0 deletions uni/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "LaunchImage.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "LaunchImage@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "LaunchImage@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions uni/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Launch Screen Assets

You can customize the launch screen with your own desired assets by replacing the image files in this directory.

You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
12 changes: 12 additions & 0 deletions uni/ios/RunnerTests/RunnerTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import Flutter
import UIKit
import XCTest

class RunnerTests: XCTestCase {

func testExample() {
// If you add code to the Runner application, consider adding tests here.
// See https://developer.apple.com/documentation/xctest for more information about using XCTest.
}

}
8 changes: 5 additions & 3 deletions uni/lib/controller/background_workers/notifications.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';
import 'package:flutter_local_notifications/flutter_local_notifications.dart';
import 'package:logger/logger.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:tuple/tuple.dart';
import 'package:uni/controller/background_workers/notifications/tuition_notification.dart';
import 'package:uni/controller/local_storage/app_shared_preferences.dart';
import 'package:uni/controller/local_storage/notification_timeout_storage.dart';
import 'package:uni/controller/local_storage/preferences_controller.dart';
import 'package:uni/controller/networking/network_router.dart';
import 'package:uni/model/entities/session.dart';
import 'package:workmanager/workmanager.dart';
Expand Down Expand Up @@ -68,8 +69,9 @@ class NotificationManager {
static const Duration _notificationWorkerPeriod = Duration(hours: 1);

static Future<void> updateAndTriggerNotifications() async {
final userInfo = await AppSharedPreferences.getPersistentUserInfo();
final faculties = await AppSharedPreferences.getUserFaculties();
PreferencesController.prefs = await SharedPreferences.getInstance();
final userInfo = PreferencesController.getPersistentUserInfo();
final faculties = PreferencesController.getUserFaculties();

if (userInfo == null || faculties.isEmpty) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import 'package:flutter_local_notifications/flutter_local_notifications.dart';
import 'package:tuple/tuple.dart';
import 'package:uni/controller/background_workers/notifications.dart';
import 'package:uni/controller/fetchers/fees_fetcher.dart';
import 'package:uni/controller/local_storage/app_shared_preferences.dart';
import 'package:uni/controller/local_storage/preferences_controller.dart';
import 'package:uni/controller/parsers/parser_fees.dart';
import 'package:uni/model/entities/session.dart';
import 'package:uni/utils/duration_string_formatter.dart';
Expand Down Expand Up @@ -53,7 +53,7 @@ class TuitionNotification extends Notification {
@override
Future<bool> shouldDisplay(Session session) async {
final notificationsAreDisabled =
!(await AppSharedPreferences.getTuitionNotificationToggle());
!PreferencesController.getTuitionNotificationToggle();
if (notificationsAreDisabled) return false;
final feesFetcher = FeesFetcher();
final dueDate = parseFeesNextLimit(
Expand Down
Loading

0 comments on commit e2e949f

Please sign in to comment.