Dangling edits

This commit is contained in:
Claudio Maggioni 2018-12-25 21:24:18 +01:00
parent f35056e075
commit cdb2cc92c1
22 changed files with 73 additions and 56 deletions

3
.gitignore vendored
View file

@ -30,6 +30,9 @@ plugins/ios.json
www/
$RECYCLE.BIN/
**/*.keystore
**/*.apk
.DS_Store
Thumbs.db
UserInterfaceState.xcuserstate

View file

@ -21,19 +21,16 @@
<preference name="SplashScreenDelay" value="3000" />
<platform name="android">
<allow-intent href="market:*" />
<icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
<icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
<icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" />
<icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" />
<icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" />
<icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" />
<splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" />
<icon density="mdpi" src="resources/android/icon/mipmap-mdpi/ic_launcher.png" />
<icon density="hdpi" src="resources/android/icon/mipmap-hdpi/ic_launcher.png" />
<icon density="xhdpi" src="resources/android/icon/mipmap-xhdpi/ic_launcher.png" />
<icon density="xxhdpi" src="resources/android/icon/mipmap-xxhdpi/ic_launcher.png" />
<icon density="xxxhdpi" src="resources/android/icon/mipmap-xxxhdpi/ic_launcher.png" />
<splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" />
<splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" />
<splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" />
<splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" />
<splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" />
<splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" />
<splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" />
<splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" />
<splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" />
@ -82,6 +79,6 @@
<plugin name="cordova-plugin-splashscreen" spec="^4.1.0" />
<plugin name="cordova-plugin-ionic-webview" spec="^1.1.16" />
<plugin name="cordova-sqlite-storage" spec="^2.1.4" />
<engine name="android" spec="~6.2.3" />
<plugin name="cordova-plugin-argo-api" spec="git+https://git.maggioni.xyz/praticamentetilde/cordova-plugin-argo-api" />
<engine name="android" spec="6.4.0" />
<allow-navigation href="http://192.168.1.201:8100" />
</widget>

40
package-lock.json generated
View file

@ -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",

View file

@ -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",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

View file

@ -18,7 +18,7 @@
<ion-menu [content]="content">
<ion-header>
<ion-toolbar>
<ion-toolbar color="primary">
<ion-title>Menu</ion-title>
</ion-toolbar>
</ion-header>

View file

@ -66,7 +66,7 @@ export class SubjectComponent {
}
}
console.log(this);
console.debug("SubjectComponent is: " + JSON.stringify(this));
this.loaded = true;
}

View file

@ -17,7 +17,7 @@
-->
<ion-header>
<ion-navbar>
<ion-navbar color="primary">
<button ion-button menuToggle>
<ion-icon name="menu"></ion-icon>
</button>
@ -26,21 +26,30 @@
</ion-header>
<ion-content padding>
<ion-card>
<ion-card-title>
Dati di accesso
</ion-card-title>
<ion-card-content>
<form (ngSubmit)="save()">
<ion-item>
<ion-label>Nome utente</ion-label>
<ion-input type="text" [(ngModel)]="user.username" name="username"></ion-input>
</ion-item>
<ion-item>
<ion-input type="text" [(ngModel)]="user.username" name="username" placeholder="Nome utente"></ion-input>
</ion-item>
<ion-label>Password</ion-label>
<ion-input type="password" [(ngModel)]="user.password" name="password"></ion-input>
</ion-item>
<ion-item>
<ion-input type="password" [(ngModel)]="user.password" name="password" placeholder="••••••••"></ion-input>
</ion-item>
<ion-label>Codice scuola</ion-label>
<ion-input type="text" [(ngModel)]="user.schoolCode" name="schoolCode"></ion-input>
<ion-item>
<ion-input type="text" [(ngModel)]="user.schoolCode" name="schoolCode" placeholder="(es. &quot;SG26426&quot;)"></ion-input>
</ion-item>
</form>
</ion-card-content>
</ion-card>
<ion-fab bottom right>
<button (click)="save()" ion-fab type="submit" block><ion-icon name="checkmark"></ion-icon></button>
<button (click)="save()" ion-fab type="submit" block color="secondary">
<ion-icon name="checkmark"></ion-icon>
</button>
</ion-fab>
</ion-content>

View file

@ -21,7 +21,7 @@ page-config {
padding-left: 0;
}
input {
text-align: right;
.card-title {
text-align: center;
}
}

View file

@ -17,7 +17,7 @@
-->
<ion-header>
<ion-navbar>
<ion-navbar color="primary">
<button ion-button menuToggle>
<ion-icon name="menu"></ion-icon>
</button>

View file

@ -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<void> {
return new Promise<void>((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();
});

View file

@ -52,8 +52,8 @@ $app-direction: ltr;
// The "primary" color is the only required color in the map.
$colors: (
primary: #488aff,
secondary: #32db64,
primary: #3f51b5,
secondary: #ff9800,
danger: #f53d3d,
light: #f4f4f4,
dark: #222