Projet

Général

Profil

Paste
Statistiques
| Branche: | Révision:

root / src / app / upgrade / upgrade.component.ts @ f92119fc

Historique | Voir | Annoter | Télécharger (1,51 ko)

1
import { Component, OnInit } from "@angular/core";
2
import { RadSideDrawer } from "nativescript-ui-sidedrawer";
3
import * as app from "tns-core-modules/application";
4
import { isAndroid, isIOS, device, screen } from "tns-core-modules/platform";
5
import { getString, setString, hasKey, remove, clear } from "tns-core-modules/application-settings";
6

    
7
@Component({
8
    selector: "Upgrade",
9
    templateUrl: "./upgrade.component.html"
10
})
11
export class UpgradeComponent implements OnInit {
12
    private changelog: string;
13
    private message: string;
14
    private upgradeuri: string;
15
    public serverJSON: JSON;
16

    
17
    constructor() {
18
        // Use the component constructor to inject providers.
19
        this.changelog = "";
20
        this.message = "";
21
        this.upgradeuri = "";
22
    }
23

    
24
    ngOnInit(): void {
25
        // Init your component properties here.
26
        this.serverJSON = JSON.parse(getString("serverJSON"));
27
        this.changelog = this.serverJSON['APPchangelog'];
28
    }
29

    
30
    onDrawerButtonTap(): void {
31
        const sideDrawer = <RadSideDrawer>app.getRootView();
32
        sideDrawer.showDrawer();
33
    }
34

    
35
    onUpgradeTap(): void {
36
        var utilityModule = require("utils/utils");
37
        if (isIOS) {
38
            utilityModule.openUrl(this.serverJSON['APPupgradeiTunes']);
39
        }
40
        else {
41
            utilityModule.openUrl(this.serverJSON['APPupgradeGooglePlay']);
42
        }
43
    }
44

    
45
    onWebsiteTap(): void {
46
        var utilityModule = require("utils/utils");
47
        utilityModule.openUrl("https://clicalbum.abuledu.net");
48
    }
49

    
50

    
51
}
Redmine Appliance - Powered by TurnKey Linux