Projet

Général

Profil

Révision 2c8d373c

Voir les différences:

App_Resources/Android/src/main/AndroidManifest.xml
1 1
<?xml version="1.0" encoding="utf-8"?>
2 2
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3 3
	package="__PACKAGE__"
4
	android:versionCode="10008"
5
	android:versionName="1.0.8">
4
	android:versionCode="10010"
5
	android:versionName="1.0.10">
6 6

  
7 7
	<supports-screens
8 8
		android:smallScreens="true"
src/app/app.component.ts
43 43
                this.routerExtensions.navigate(["/upgrade"]);
44 44
                return;
45 45
            }
46

  
47
            if (this.email == "" || this.pseudo == "") {
48
                // alert("L'application n'est pas configurée ...")
49
                this._activatedUrl = "/settings";
50
                this.routerExtensions.navigate(["/settings"]);
51
            }
52
            else {
53
                this._activatedUrl = "/home";
54
            }
55

  
46 56
        }, (e) => {
47 57
            console.log("getJSON Error", e);
58
            dialogs.alert({
59
                title: "Erreur de communication",
60
                message: "Le serveur principal de ClicAlbum est injoignable, veuillez re-essayer dans quelques minutes et si ça ne marche toujours pas envoyez nous un petit message à contact@abuledu.org merci :-)",
61
                okButtonText: "Ok"
62
            }).then(() => {
63
            });
48 64
        });
49 65

  
50
        if (this.email == "" || this.pseudo == "") {
51
            // alert("L'application n'est pas configurée ...")
52
            this._activatedUrl = "/settings";
53
            this.routerExtensions.navigate(["/settings"]);
54
        }
55
        else {
56
            this._activatedUrl = "/home";
57
        }
58 66
        this._sideDrawerTransition = new SlideInOnTopTransition();
59 67

  
60 68
        this.router.events
src/app/home/home.component.ts
13 13
import { ActivityIndicator } from "tns-core-modules/ui/activity-indicator";
14 14
import { getString, setString, hasKey, remove, clear } from "tns-core-modules/application-settings";
15 15
import { Button } from "tns-core-modules/ui/button";
16
import { NavigationEnd, Router } from "@angular/router";
17
import { RouterExtensions } from "nativescript-angular/router";
16 18

  
17 19
import * as bghttp from "nativescript-background-http";
18 20
import * as appversion from "nativescript-appversion";
......
44 46
    public isBusy: boolean = true;
45 47

  
46 48

  
47
    constructor() {
49
    constructor(private router: Router, private routerExtensions: RouterExtensions) {
48 50
        // Use the component constructor to inject providers.
49 51
        appversion.getVersionName().then((v: string) => {
50 52
            if (isAndroid) {
......
73 75
        this.label = "";
74 76
        this.legende = "";
75 77
        this.isBusy = false;
76
        this.enableButtons("btnSendPicture", false)
78
        this.enableButtons("btnSendPicture", false);
79

  
80
        if (this.email == "" || this.pseudo == "") {
81
            // alert("L'application n'est pas configurée ...")
82
            this.routerExtensions.navigate(["/settings"]);
83
        }
84

  
77 85
    }
78 86

  
79 87
    enableButtons(btnName, onOff) {
src/app/settings/settings.component.ts
64 64
            }
65 65
            i++;
66 66
        });
67

  
68
        //Si jamais le téléchargement fait au lancement a foiré ...
69
        if (i == 0) {
70
            getJSON("https://clicaudio.abuledu.net/api.php").then((r: any) => {
71
                console.log("getJSON : ", r);
72
                this.serverJSON = r;
73
                let i = 0;
74
                r.servers.forEach(element => {
75
                    console.log(" json element : ", element.name);
76
                    let option = new RadioOption(element.label, element.uri);
77
                    this.radioOptions.push(option);
78
                    if (i == 0) {
79
                        console.log(" premier element on le checked : ", element.label);
80
                        this.serverLabel = element.label;
81
                        this.serverName = element.label;
82
                        this.serverURI = element.uri;
83
                        option.selected = true;
84
                    }
85
                    i++;
86
                });
87
            }, (e) => {
88
                console.log("getJSON Error", e);
89
            });
90
        }
91

  
67 92
    }
68 93

  
69 94
    changeCheckedRadio(radioOption: RadioOption): void {

Formats disponibles : Unified diff

Redmine Appliance - Powered by TurnKey Linux