Skip to content
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.

Update #113

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 1 addition & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,8 @@ jobs:
language: node_js
node_js: "12.14.1"

services:
- xvfb
addons:
chrome: stable

install:
- npm install -g ionic firebase-tools
- npm install -g ionic
- npm install
- ionic info

Expand Down
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"@ionic-native/device": "^5.0.0",
"@ionic-native/geolocation": "^5.0.0",
"@ionic-native/google-maps": "^5.0.0",
"@ionic-native/http": "^5.22.0",
"@ionic-native/in-app-browser": "^5.0.0",
"@ionic-native/market": "^5.0.0",
"@ionic-native/network": "^5.0.0",
Expand All @@ -40,9 +41,11 @@
"@types/node": "^12.12.27",
"cordova": "^9.0.0",
"cordova-android": "^8.1.0",
"cordova-plugin-advanced-http": "^2.4.1",
"cordova-plugin-appavailability": "^0.4.2",
"cordova-plugin-calendar": "~5.1.5",
"cordova-plugin-device": "^2.0.3",
"cordova-plugin-file": "^6.0.2",
"cordova-plugin-googlemaps": "git+https://github.com/mapsplugin/cordova-plugin-googlemaps.git#multiple_maps",
"cordova-plugin-googlemaps-sdk": "git+https://github.com/mapsplugin/cordova-plugin-googlemaps-sdk.git",
"cordova-plugin-market": "^1.2.0",
Expand All @@ -55,7 +58,6 @@
"ionic-cache": "^4.1.0",
"ionicons": "^5.0.1",
"rxjs": "^6.5.4",
"sw-toolbox": "^3.6.0",
"timers": "^0.1.1",
"zone.js": "^0.10.2"
},
Expand All @@ -73,9 +75,8 @@
"karma-jasmine": "^2.0.1",
"karma-jasmine-html-reporter": "^1.5.2",
"karma-spec-reporter": "0.0.32",
"node-sass": "^4.13.1",
"protractor": "^5.4.3",
"typescript": "~3.4.5",
"typescript": "~3.5.3",
"webpack": "^4.42.0"
},
"description": "Stud.UCLouvain : an app for UCLouvain students made by UCLouvain students",
Expand All @@ -97,7 +98,8 @@
"cordova-support-google-services": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-calendar": {},
"cordova-plugin-network-information": {}
"cordova-plugin-network-information": {},
"cordova-plugin-advanced-http": {}
},
"platforms": [
"android"
Expand Down
1 change: 0 additions & 1 deletion src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ export class MyApp {
this.initializeApp();
this.getPages();
platform.ready().then(() => {
this.wso2Service.getToken();
translateService.setDefaultLang('fr');
this.user.storage.get('lan').then(data => {
translateService.use(data !== null ? data : 'fr');
Expand Down
2 changes: 0 additions & 2 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ import { SettingsProvider } from "../services/utils-services/settings-service";
import { HomePage } from "../pages/home/home";
import { TutoPage } from "../pages/tuto/tuto";
import { FormsModule } from "@angular/forms";
import { CommonModule } from "@angular/common";
import { AppRoutingModule } from "./app-routing.module";
import { ServiceWorkerModule } from '@angular/service-worker';

Expand All @@ -79,7 +78,6 @@ export function HttpLoaderFactory(http: HttpClient) {
IonicStorageModule.forRoot(),
HttpClientModule,
AppRoutingModule,
CommonModule,
FormsModule,
TranslateModule.forRoot({
loader: {
Expand Down
19 changes: 5 additions & 14 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,13 @@
<meta content="no" name="msapplication-tap-highlight">

<link href="assets/icon/favicon.ico" rel="icon" type="image/x-icon">
<!-- <link href="manifest.json" rel="manifest">-->
<link href="manifest.webmanifest" rel="manifest">
<meta content="#4e8ef7" name="theme-color">

<!-- cordova.js required for cordova apps -->
<!-- <script async src="cordova.js"></script>-->

<!-- un-comment this code to enable service worker-->
<script>
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('service-worker.js')
.then(() => console.log('service worker installed'))
.catch(err => console.error('Error', err));
}
</script>

<link href="build/main.css" rel="stylesheet">
<!-- <link href="build/main.css" rel="stylesheet">-->

<link rel="manifest" href="manifest.webmanifest">
<meta name="theme-color" content="#1976d2">
Expand All @@ -47,8 +38,8 @@

<noscript>Please enable JavaScript to continue using this application.</noscript>
</body>
<noscript>
<h1>You must enable JavaScript to view this page.</h1>
</noscript>
<!--<noscript>-->
<!-- <h1>You must enable JavaScript to view this page.</h1>-->
<!--</noscript>-->

</html>
15 changes: 0 additions & 15 deletions src/manifest.json

This file was deleted.

2 changes: 1 addition & 1 deletion src/pages/events/events.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ <h3>{{event.title}}</h3>

<ion-button (click)="utilsService.addFavorite(eventsList, event, 'EVENTS')" *ngIf="segment === 'all'"
class="large-icon" fill="outline">
<ion-icon name="star-outline="></ion-icon>
<ion-icon name="star-outline"></ion-icon>
</ion-button>

<ion-button (click)="removeFavorite(event, 'Remove Favorite')" *ngIf="segment === 'favorites'"
Expand Down
1 change: 0 additions & 1 deletion src/pages/home/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

-->
<!--EN-TETE-->
<script src="../../../../StudUCLouvain_ionic-v4/src/app/home/home.page.ts"></script>
<ion-header *ngIf="(userS.hasCampus() === true)">
<ion-toolbar color="home">
<ion-title>
Expand Down
2 changes: 2 additions & 0 deletions src/pages/home/home.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,10 @@ export class HomePage {
private utilsService: UtilsService,
private settings: SettingsProvider
) {
console.log("start home constructor", this.selectedTheme);
this.settings.getActiveTheme().subscribe(val => this.selectedTheme = val);
document.title = this.title;
console.log("end home constructor", this.selectedTheme);
// this.userS.addCampus('');
}

Expand Down
2 changes: 1 addition & 1 deletion src/pages/sports/sports.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ <h3>{{sport.sport}} {{sport.sexe}} {{sport.type}}</h3>
<ion-button (click)="utilsService.addFavorite(sport, 'SPORTS')"
*ngIf="segment === 'all' || segment === 'team'"
class="large-icon">
<ion-icon name="star-outline="></ion-icon>
<ion-icon name="star-outline"></ion-icon>
</ion-button>
<ion-button (click)="removeFavorite(sport, 'Remove Favorite')" *ngIf="segment === 'favorites'"
class="large-icon">
Expand Down
4 changes: 0 additions & 4 deletions src/pages/studies/studies.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ <h4 *ngIf="prog" text-center>{{prog}}</h4>
<ion-item-sliding #slidingItem>
<ion-item>
<ion-label>{{activity.sigle}}</ion-label>
<!-- - {{activity.name}}-->
</ion-item>
<ion-item-options>
<ion-button (click)="addCourseFromProgram(activity.sigle)" class="large-icon" fill="outline">
Expand All @@ -125,10 +124,7 @@ <h4 *ngIf="prog" text-center>{{prog}}</h4>
</ion-list>
<p *ngIf="activities.length <= 0">{{'STUDY.NO' | translate}}</p>
</ion-list>

</ng-container>


</ion-content>

<!-------------------------------- BUTTON TO ADD COURSE ---------------------------------------------------->
Expand Down
29 changes: 20 additions & 9 deletions src/pages/tuto/tuto.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,27 @@
You should have received a copy of the GNU General Public License
along with UCLCampus. If not, see <http://www.gnu.org/licenses/>.
*/

#slides {
ion-slides {
background: var(--ion-color-uclouvain) !important;
}
height: 100%;

ion-slide img {
height: 50vh !important;
}
ion-slide {
height: 100%;

ion-slide p {
color: white;
}
ion-row {
justify-content: center;

p {
color: white;
}

img {
height: 70vh;
}

.descr p {
height: 20vh;
}
}
}
}
30 changes: 0 additions & 30 deletions src/service-worker.js

This file was deleted.

4 changes: 3 additions & 1 deletion src/services/utils-services/settings-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import { Injectable } from '@angular/core';
import { BehaviorSubject } from 'rxjs';


@Injectable()
@Injectable({
providedIn: 'root'
})
export class SettingsProvider {

private theme: BehaviorSubject<string>;
Expand Down
4 changes: 3 additions & 1 deletion src/services/utils-services/user-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
import { Injectable } from '@angular/core';
import { Storage } from '@ionic/storage';

@Injectable()
@Injectable({
providedIn: 'root'
})
export class UserService {

favorites: string[] = [];
Expand Down
4 changes: 3 additions & 1 deletion src/services/utils-services/utils-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ import { Page } from "../../app/entity/page";
import { NavigationExtras } from "@angular/router";
import * as xml2js from 'xml2js';

@Injectable()
@Injectable({
providedIn: 'root'
})
export class UtilsService {
loading: any;
shownGroup = null;
Expand Down
8 changes: 5 additions & 3 deletions src/services/wso2-services/wso2-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ import { wso2HeaderStudent } from '../../app/variables-config';
See https://angular.io/docs/ts/latest/guide/dependency-injection.html
for more info on services and Angular 2 DI.
*/
@Injectable()
@Injectable({
providedIn: 'root'
})
export class Wso2Service {

wso2ServiceBaseUrl = 'https://api.sgsi.ucl.ac.be:8243/';
Expand Down Expand Up @@ -44,14 +46,14 @@ export class Wso2Service {
// this.optionsToken = new RequestOptions({headers: headers});

const finalUrl = this.wso2ServiceBaseUrl + 'token';
this.http.post(finalUrl, body, {headers: headers}).pipe(
return this.http.post(finalUrl, body, {headers: headers}).pipe(
map(res => {
this.token = 'Bearer ' + res['access_token'];
})).subscribe(res => {
return 'OK';
}, error => {
console.log('Token error');
error;
return error;
});
}

Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"compilerOptions": {
"baseUrl": "./",
"declaration": false,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
Expand Down