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/ www/
$RECYCLE.BIN/ $RECYCLE.BIN/
**/*.keystore
**/*.apk
.DS_Store .DS_Store
Thumbs.db Thumbs.db
UserInterfaceState.xcuserstate UserInterfaceState.xcuserstate

View file

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

40
package-lock.json generated
View file

@ -912,11 +912,12 @@
"dev": true "dev": true
}, },
"cordova-android": { "cordova-android": {
"version": "6.2.3", "version": "6.4.0",
"resolved": "https://registry.npmjs.org/cordova-android/-/cordova-android-6.2.3.tgz", "resolved": "https://registry.npmjs.org/cordova-android/-/cordova-android-6.4.0.tgz",
"integrity": "sha1-JJ8hts5fHxyEenq4OxaQnb7Vqig=", "integrity": "sha1-VK6NpXKKjX5e/MYXLT3MoXvH/n0=",
"requires": { "requires": {
"cordova-common": "2.0.2", "android-versions": "1.2.1",
"cordova-common": "2.1.0",
"elementtree": "0.1.6", "elementtree": "0.1.6",
"nopt": "3.0.6", "nopt": "3.0.6",
"properties-parser": "0.2.3", "properties-parser": "0.2.3",
@ -928,12 +929,16 @@
"version": "1.1.0", "version": "1.1.0",
"bundled": true "bundled": true
}, },
"android-versions": {
"version": "1.2.1",
"bundled": true
},
"ansi": { "ansi": {
"version": "0.3.1", "version": "0.3.1",
"bundled": true "bundled": true
}, },
"balanced-match": { "balanced-match": {
"version": "0.4.2", "version": "1.0.0",
"bundled": true "bundled": true
}, },
"base64-js": { "base64-js": {
@ -941,21 +946,21 @@
"bundled": true "bundled": true
}, },
"big-integer": { "big-integer": {
"version": "1.6.22", "version": "1.6.25",
"bundled": true "bundled": true
}, },
"bplist-parser": { "bplist-parser": {
"version": "0.1.1", "version": "0.1.1",
"bundled": true, "bundled": true,
"requires": { "requires": {
"big-integer": "1.6.22" "big-integer": "1.6.25"
} }
}, },
"brace-expansion": { "brace-expansion": {
"version": "1.1.7", "version": "1.1.8",
"bundled": true, "bundled": true,
"requires": { "requires": {
"balanced-match": "0.4.2", "balanced-match": "1.0.0",
"concat-map": "0.0.1" "concat-map": "0.0.1"
} }
}, },
@ -964,7 +969,7 @@
"bundled": true "bundled": true
}, },
"cordova-common": { "cordova-common": {
"version": "2.0.2", "version": "2.1.0",
"bundled": true, "bundled": true,
"requires": { "requires": {
"ansi": "0.3.1", "ansi": "0.3.1",
@ -972,11 +977,11 @@
"cordova-registry-mapper": "1.1.15", "cordova-registry-mapper": "1.1.15",
"elementtree": "0.1.6", "elementtree": "0.1.6",
"glob": "5.0.15", "glob": "5.0.15",
"minimatch": "3.0.3", "minimatch": "3.0.4",
"osenv": "0.1.4", "osenv": "0.1.4",
"plist": "1.2.0", "plist": "1.2.0",
"q": "1.5.0", "q": "1.5.0",
"semver": "5.3.0", "semver": "5.4.1",
"shelljs": "0.5.3", "shelljs": "0.5.3",
"underscore": "1.8.3", "underscore": "1.8.3",
"unorm": "1.4.1" "unorm": "1.4.1"
@ -999,7 +1004,7 @@
"requires": { "requires": {
"inflight": "1.0.6", "inflight": "1.0.6",
"inherits": "2.0.3", "inherits": "2.0.3",
"minimatch": "3.0.3", "minimatch": "3.0.4",
"once": "1.4.0", "once": "1.4.0",
"path-is-absolute": "1.0.1" "path-is-absolute": "1.0.1"
} }
@ -1021,10 +1026,10 @@
"bundled": true "bundled": true
}, },
"minimatch": { "minimatch": {
"version": "3.0.3", "version": "3.0.4",
"bundled": true, "bundled": true,
"requires": { "requires": {
"brace-expansion": "1.1.7" "brace-expansion": "1.1.8"
} }
}, },
"nopt": { "nopt": {
@ -1084,7 +1089,7 @@
"bundled": true "bundled": true
}, },
"semver": { "semver": {
"version": "5.3.0", "version": "5.4.1",
"bundled": true "bundled": true
}, },
"shelljs": { "shelljs": {
@ -1120,9 +1125,6 @@
} }
} }
}, },
"cordova-plugin-argo-api": {
"version": "git+https://git.maggioni.xyz/praticamentetilde/cordova-plugin-argo-api#c17330f5040b4166021a891e500a626a26566b51"
},
"cordova-plugin-device": { "cordova-plugin-device": {
"version": "1.1.7", "version": "1.1.7",
"resolved": "https://registry.npmjs.org/cordova-plugin-device/-/cordova-plugin-device-1.1.7.tgz", "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/splash-screen": "4.4.0",
"@ionic-native/status-bar": "4.4.0", "@ionic-native/status-bar": "4.4.0",
"@ionic/storage": "^2.1.3", "@ionic/storage": "^2.1.3",
"cordova-android": "^6.2.3", "cordova-android": "6.4.0",
"cordova-plugin-argo-api": "git+https://git.maggioni.xyz/praticamentetilde/cordova-plugin-argo-api",
"cordova-plugin-device": "^1.1.7", "cordova-plugin-device": "^1.1.7",
"cordova-plugin-ionic-webview": "^1.1.16", "cordova-plugin-ionic-webview": "^1.1.16",
"cordova-plugin-splashscreen": "^4.1.0", "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-menu [content]="content">
<ion-header> <ion-header>
<ion-toolbar> <ion-toolbar color="primary">
<ion-title>Menu</ion-title> <ion-title>Menu</ion-title>
</ion-toolbar> </ion-toolbar>
</ion-header> </ion-header>

View file

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

View file

@ -17,7 +17,7 @@
--> -->
<ion-header> <ion-header>
<ion-navbar> <ion-navbar color="primary">
<button ion-button menuToggle> <button ion-button menuToggle>
<ion-icon name="menu"></ion-icon> <ion-icon name="menu"></ion-icon>
</button> </button>
@ -26,21 +26,30 @@
</ion-header> </ion-header>
<ion-content padding> <ion-content padding>
<ion-card>
<ion-card-title>
Dati di accesso
</ion-card-title>
<ion-card-content>
<form (ngSubmit)="save()"> <form (ngSubmit)="save()">
<ion-item>
<ion-label>Nome utente</ion-label> <ion-label>Nome utente</ion-label>
<ion-input type="text" [(ngModel)]="user.username" name="username"></ion-input>
</ion-item>
<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-label>Password</ion-label>
<ion-input type="password" [(ngModel)]="user.password" name="password"></ion-input>
</ion-item>
<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-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> </ion-item>
</form> </form>
</ion-card-content>
</ion-card>
<ion-fab bottom right> <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-fab>
</ion-content> </ion-content>

View file

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

View file

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

View file

@ -19,6 +19,7 @@
import { Component } from '@angular/core'; import { Component } from '@angular/core';
import { NavController, AlertController, ToastController } from 'ionic-angular'; import { NavController, AlertController, ToastController } from 'ionic-angular';
import { Storage } from '@ionic/storage'; import { Storage } from '@ionic/storage';
import { ConfigPage } from '../config/config';
export interface ArgoUser { export interface ArgoUser {
username: string; username: string;
@ -58,9 +59,10 @@ export class HomePage {
warnNoData(): void { warnNoData(): void {
this.toastCtrl.create({ this.toastCtrl.create({
message: "Inserire i propri dati di accesso nella pagina \"Impostazioni\"", message: "Inserire i propri dati di accesso.",
duration: 3000 duration: 5000
}).present(); }).present();
this.navCtrl.setRoot(ConfigPage);
} }
doRefresh(refresher): void { doRefresh(refresher): void {
@ -70,19 +72,23 @@ export class HomePage {
private getMarks(): Promise<void> { private getMarks(): Promise<void> {
return new Promise<void>((resolve, _) => { return new Promise<void>((resolve, _) => {
this.storage.get('user').then((user: ArgoUser) => { this.storage.get('user').then((user: ArgoUser) => {
console.debug("ArgoUser is: " + JSON.stringify(user));
if (user == null) { if (user == null) {
console.debug("User in storage is null");
this.warnNoData(); this.warnNoData();
resolve(); resolve();
} }
window["cordova"].plugins.ArgoAPIPlugin.getMarks({ window["cordova"].plugins.ArgoAPIPlugin.getMarks({
username: "maggioni", username: user.username,
password: "huuu273j", password: user.password,
schoolCode: "SG26426" schoolCode: user.schoolCode,
}).then((marks: ArgoMarks) => { }).then((marks: ArgoMarks) => {
console.debug("Got mark data: " + JSON.stringify(marks));
this.data = marks; this.data = marks;
resolve(); resolve();
}).catch((err: ArgoMarks) => { }).catch((err: ArgoMarks) => {
console.debug("Error in ArgoAPIPlugin call: " + JSON.stringify(err))
this.alertCtrl.create({ this.alertCtrl.create({
title: "Lettura voti fallita:", title: "Lettura voti fallita:",
subTitle: err.message, subTitle: err.message,
@ -90,7 +96,8 @@ export class HomePage {
}); });
resolve(); resolve();
}); });
}).catch(_ => { }).catch(e => {
console.debug("Error in Storage fetch: " + JSON.stringify(e));
this.warnNoData(); this.warnNoData();
resolve(); resolve();
}); });

View file

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