-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.merge_file_a16644
88 lines (70 loc) · 2.72 KB
/
.merge_file_a16644
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
import { Component, ViewChild } from "@angular/core";
import { Platform, Nav } from "ionic-angular";
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import { Keyboard } from '@ionic-native/keyboard';
import { HomePage } from "../pages/home/home";
import { LoginPage } from "../pages/login/login";
import { faq } from "../pages/faq/faq";
import { achievements } from "../pages/achievements/achievements";
// import { LocalWeatherPage } from "../pages/local-weather/local-weather";
//********************************************************************************************
//Delete above and use below
// import { TournamentsPage } from "../pages/tournaments/tournaments";
// import { AccomplishmentsPage } from "../pages/accomplishments/accomplishments";
import { SettingsPage } from "../pages/settings/settings";
import { LeaderboardsPage } from "../pages/leaderboards/leaderboards";
import { ldrsub } from "../pages/ldrsub/ldrsub";
// import { FAQ } from "../pages/faq/faq";
export interface MenuItem {
title: string;
component: any;
icon: string;
}
@Component({
templateUrl: 'app.html'
})
export class MyApp {
@ViewChild(Nav) nav: Nav;
rootPage: any = LoginPage;
appMenuItems: Array<MenuItem>;
constructor(
public platform: Platform,
public statusBar: StatusBar,
public splashScreen: SplashScreen,
public keyboard: Keyboard
) {
this.initializeApp();
//*******************************************************************************************************************
this.appMenuItems = [
{title: 'Home', component: HomePage, icon: 'home'},
{title: 'FAQ', component: faq, icon: 'help-circle'},
{title: 'Achievements', component: achievements, icon: 'trophy'},
// {title: 'Find Tournaments', component: HomePage, icon: 'ios-search'},
{title: 'Leaderboards', component: LeaderboardsPage, icon: 'stats'},
{title: 'Settings', component: SettingsPage, icon: 'build'},
{title: 'SubpageParticipation', component: ldrsub, icon: 'build'},
];
}
initializeApp() {
this.platform.ready().then(() => {
// Okay, so the platform is ready and our plugins are available.
//*** Control Splash Screen
// this.splashScreen.show();
// this.splashScreen.hide();
//*** Control Status Bar
this.statusBar.styleDefault();
this.statusBar.overlaysWebView(false);
//*** Control Keyboard
this.keyboard.disableScroll(true);
});
}
openPage(page) {
// Reset the content nav to have just this page
// we wouldn't want the back button to show in this scenario
this.nav.setRoot(page.component);
}
logout() {
this.nav.setRoot(LoginPage);
}
}