diff --git a/.gitignore b/.gitignore
index faf0575..c621545 100644
--- a/.gitignore
+++ b/.gitignore
@@ -30,6 +30,9 @@ plugins/ios.json
www/
$RECYCLE.BIN/
+**/*.keystore
+**/*.apk
+
.DS_Store
Thumbs.db
UserInterfaceState.xcuserstate
diff --git a/config.xml b/config.xml
index eda9af9..c254c87 100644
--- a/config.xml
+++ b/config.xml
@@ -21,19 +21,16 @@
-
-
-
-
-
-
-
+
+
+
+
+
-
@@ -82,6 +79,6 @@
-
-
+
+
diff --git a/package-lock.json b/package-lock.json
index bd1efad..8610e1d 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -912,11 +912,12 @@
"dev": true
},
"cordova-android": {
- "version": "6.2.3",
- "resolved": "https://registry.npmjs.org/cordova-android/-/cordova-android-6.2.3.tgz",
- "integrity": "sha1-JJ8hts5fHxyEenq4OxaQnb7Vqig=",
+ "version": "6.4.0",
+ "resolved": "https://registry.npmjs.org/cordova-android/-/cordova-android-6.4.0.tgz",
+ "integrity": "sha1-VK6NpXKKjX5e/MYXLT3MoXvH/n0=",
"requires": {
- "cordova-common": "2.0.2",
+ "android-versions": "1.2.1",
+ "cordova-common": "2.1.0",
"elementtree": "0.1.6",
"nopt": "3.0.6",
"properties-parser": "0.2.3",
@@ -928,12 +929,16 @@
"version": "1.1.0",
"bundled": true
},
+ "android-versions": {
+ "version": "1.2.1",
+ "bundled": true
+ },
"ansi": {
"version": "0.3.1",
"bundled": true
},
"balanced-match": {
- "version": "0.4.2",
+ "version": "1.0.0",
"bundled": true
},
"base64-js": {
@@ -941,21 +946,21 @@
"bundled": true
},
"big-integer": {
- "version": "1.6.22",
+ "version": "1.6.25",
"bundled": true
},
"bplist-parser": {
"version": "0.1.1",
"bundled": true,
"requires": {
- "big-integer": "1.6.22"
+ "big-integer": "1.6.25"
}
},
"brace-expansion": {
- "version": "1.1.7",
+ "version": "1.1.8",
"bundled": true,
"requires": {
- "balanced-match": "0.4.2",
+ "balanced-match": "1.0.0",
"concat-map": "0.0.1"
}
},
@@ -964,7 +969,7 @@
"bundled": true
},
"cordova-common": {
- "version": "2.0.2",
+ "version": "2.1.0",
"bundled": true,
"requires": {
"ansi": "0.3.1",
@@ -972,11 +977,11 @@
"cordova-registry-mapper": "1.1.15",
"elementtree": "0.1.6",
"glob": "5.0.15",
- "minimatch": "3.0.3",
+ "minimatch": "3.0.4",
"osenv": "0.1.4",
"plist": "1.2.0",
"q": "1.5.0",
- "semver": "5.3.0",
+ "semver": "5.4.1",
"shelljs": "0.5.3",
"underscore": "1.8.3",
"unorm": "1.4.1"
@@ -999,7 +1004,7 @@
"requires": {
"inflight": "1.0.6",
"inherits": "2.0.3",
- "minimatch": "3.0.3",
+ "minimatch": "3.0.4",
"once": "1.4.0",
"path-is-absolute": "1.0.1"
}
@@ -1021,10 +1026,10 @@
"bundled": true
},
"minimatch": {
- "version": "3.0.3",
+ "version": "3.0.4",
"bundled": true,
"requires": {
- "brace-expansion": "1.1.7"
+ "brace-expansion": "1.1.8"
}
},
"nopt": {
@@ -1084,7 +1089,7 @@
"bundled": true
},
"semver": {
- "version": "5.3.0",
+ "version": "5.4.1",
"bundled": true
},
"shelljs": {
@@ -1120,9 +1125,6 @@
}
}
},
- "cordova-plugin-argo-api": {
- "version": "git+https://git.maggioni.xyz/praticamentetilde/cordova-plugin-argo-api#c17330f5040b4166021a891e500a626a26566b51"
- },
"cordova-plugin-device": {
"version": "1.1.7",
"resolved": "https://registry.npmjs.org/cordova-plugin-device/-/cordova-plugin-device-1.1.7.tgz",
diff --git a/package.json b/package.json
index c95ed86..a9d664b 100644
--- a/package.json
+++ b/package.json
@@ -25,8 +25,7 @@
"@ionic-native/splash-screen": "4.4.0",
"@ionic-native/status-bar": "4.4.0",
"@ionic/storage": "^2.1.3",
- "cordova-android": "^6.2.3",
- "cordova-plugin-argo-api": "git+https://git.maggioni.xyz/praticamentetilde/cordova-plugin-argo-api",
+ "cordova-android": "6.4.0",
"cordova-plugin-device": "^1.1.7",
"cordova-plugin-ionic-webview": "^1.1.16",
"cordova-plugin-splashscreen": "^4.1.0",
@@ -59,4 +58,4 @@
"android"
]
}
-}
\ No newline at end of file
+}
diff --git a/resources/android/icon/drawable-hdpi-icon.png b/resources/android/icon/drawable-hdpi-icon.png
deleted file mode 100644
index b910093..0000000
Binary files a/resources/android/icon/drawable-hdpi-icon.png and /dev/null differ
diff --git a/resources/android/icon/drawable-ldpi-icon.png b/resources/android/icon/drawable-ldpi-icon.png
deleted file mode 100644
index 16cd5db..0000000
Binary files a/resources/android/icon/drawable-ldpi-icon.png and /dev/null differ
diff --git a/resources/android/icon/drawable-mdpi-icon.png b/resources/android/icon/drawable-mdpi-icon.png
deleted file mode 100644
index 64a6cbc..0000000
Binary files a/resources/android/icon/drawable-mdpi-icon.png and /dev/null differ
diff --git a/resources/android/icon/drawable-xhdpi-icon.png b/resources/android/icon/drawable-xhdpi-icon.png
deleted file mode 100644
index 1605f69..0000000
Binary files a/resources/android/icon/drawable-xhdpi-icon.png and /dev/null differ
diff --git a/resources/android/icon/drawable-xxhdpi-icon.png b/resources/android/icon/drawable-xxhdpi-icon.png
deleted file mode 100644
index 56fb29e..0000000
Binary files a/resources/android/icon/drawable-xxhdpi-icon.png and /dev/null differ
diff --git a/resources/android/icon/drawable-xxxhdpi-icon.png b/resources/android/icon/drawable-xxxhdpi-icon.png
deleted file mode 100644
index e4a9152..0000000
Binary files a/resources/android/icon/drawable-xxxhdpi-icon.png and /dev/null differ
diff --git a/resources/android/icon/mipmap-hdpi/ic_launcher.png b/resources/android/icon/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 0000000..791d8bd
Binary files /dev/null and b/resources/android/icon/mipmap-hdpi/ic_launcher.png differ
diff --git a/resources/android/icon/mipmap-mdpi/ic_launcher.png b/resources/android/icon/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 0000000..039186c
Binary files /dev/null and b/resources/android/icon/mipmap-mdpi/ic_launcher.png differ
diff --git a/resources/android/icon/mipmap-xhdpi/ic_launcher.png b/resources/android/icon/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..45a2582
Binary files /dev/null and b/resources/android/icon/mipmap-xhdpi/ic_launcher.png differ
diff --git a/resources/android/icon/mipmap-xxhdpi/ic_launcher.png b/resources/android/icon/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..1ae25aa
Binary files /dev/null and b/resources/android/icon/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/resources/android/icon/mipmap-xxxhdpi/ic_launcher.png b/resources/android/icon/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 0000000..946b7ee
Binary files /dev/null and b/resources/android/icon/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/src/app/app.html b/src/app/app.html
index 3315f88..be48661 100644
--- a/src/app/app.html
+++ b/src/app/app.html
@@ -18,7 +18,7 @@
-
+
Menu
diff --git a/src/components/subject/subject.ts b/src/components/subject/subject.ts
index ed65404..b933d22 100644
--- a/src/components/subject/subject.ts
+++ b/src/components/subject/subject.ts
@@ -66,7 +66,7 @@ export class SubjectComponent {
}
}
- console.log(this);
+ console.debug("SubjectComponent is: " + JSON.stringify(this));
this.loaded = true;
}
diff --git a/src/pages/config/config.html b/src/pages/config/config.html
index e99da98..2ca8e90 100644
--- a/src/pages/config/config.html
+++ b/src/pages/config/config.html
@@ -17,7 +17,7 @@
-->
-
+
@@ -26,21 +26,30 @@
+
+
+ Dati di accesso
+
+
+
+
-
+
diff --git a/src/pages/config/config.scss b/src/pages/config/config.scss
index 098604a..f2358f5 100644
--- a/src/pages/config/config.scss
+++ b/src/pages/config/config.scss
@@ -21,7 +21,7 @@ page-config {
padding-left: 0;
}
- input {
- text-align: right;
+ .card-title {
+ text-align: center;
}
}
diff --git a/src/pages/home/home.html b/src/pages/home/home.html
index 3e09b04..2f0c353 100644
--- a/src/pages/home/home.html
+++ b/src/pages/home/home.html
@@ -17,7 +17,7 @@
-->
-
+
diff --git a/src/pages/home/home.ts b/src/pages/home/home.ts
index 981c30b..3dbc0ab 100644
--- a/src/pages/home/home.ts
+++ b/src/pages/home/home.ts
@@ -19,6 +19,7 @@
import { Component } from '@angular/core';
import { NavController, AlertController, ToastController } from 'ionic-angular';
import { Storage } from '@ionic/storage';
+import { ConfigPage } from '../config/config';
export interface ArgoUser {
username: string;
@@ -58,9 +59,10 @@ export class HomePage {
warnNoData(): void {
this.toastCtrl.create({
- message: "Inserire i propri dati di accesso nella pagina \"Impostazioni\"",
- duration: 3000
+ message: "Inserire i propri dati di accesso.",
+ duration: 5000
}).present();
+ this.navCtrl.setRoot(ConfigPage);
}
doRefresh(refresher): void {
@@ -70,19 +72,23 @@ export class HomePage {
private getMarks(): Promise {
return new Promise((resolve, _) => {
this.storage.get('user').then((user: ArgoUser) => {
+ console.debug("ArgoUser is: " + JSON.stringify(user));
if (user == null) {
+ console.debug("User in storage is null");
this.warnNoData();
resolve();
}
window["cordova"].plugins.ArgoAPIPlugin.getMarks({
- username: "maggioni",
- password: "huuu273j",
- schoolCode: "SG26426"
+ username: user.username,
+ password: user.password,
+ schoolCode: user.schoolCode,
}).then((marks: ArgoMarks) => {
+ console.debug("Got mark data: " + JSON.stringify(marks));
this.data = marks;
resolve();
}).catch((err: ArgoMarks) => {
+ console.debug("Error in ArgoAPIPlugin call: " + JSON.stringify(err))
this.alertCtrl.create({
title: "Lettura voti fallita:",
subTitle: err.message,
@@ -90,7 +96,8 @@ export class HomePage {
});
resolve();
});
- }).catch(_ => {
+ }).catch(e => {
+ console.debug("Error in Storage fetch: " + JSON.stringify(e));
this.warnNoData();
resolve();
});
diff --git a/src/theme/variables.scss b/src/theme/variables.scss
index 2eda2ae..233b8bd 100644
--- a/src/theme/variables.scss
+++ b/src/theme/variables.scss
@@ -52,11 +52,11 @@ $app-direction: ltr;
// The "primary" color is the only required color in the map.
$colors: (
- primary: #488aff,
- secondary: #32db64,
- danger: #f53d3d,
- light: #f4f4f4,
- dark: #222
+ primary: #3f51b5,
+ secondary: #ff9800,
+ danger: #f53d3d,
+ light: #f4f4f4,
+ dark: #222
);