mirror of
https://github.com/sensebox/blockly-app
synced 2025-07-04 13:00:21 +02:00
added pages and inputs for login
This commit is contained in:
parent
e6ef341fcc
commit
8b2f2484f9
14 changed files with 217 additions and 2 deletions
|
@ -45,6 +45,11 @@ export class openSenseApp {
|
|||
icon: 'settings',
|
||||
component: 'ConfigurationPage'
|
||||
},
|
||||
{
|
||||
title: 'MENU.MYSENSEBOX',
|
||||
icon: "settings",
|
||||
component : 'LoginPage'
|
||||
}
|
||||
];
|
||||
|
||||
constructor(
|
||||
|
|
|
@ -14,6 +14,7 @@ import { LoggingProvider } from '../providers/logging/logging';
|
|||
import { StorageProvider } from '../providers/storage/storage';
|
||||
import { AddItemPage } from '../pages/add-item/add-item';
|
||||
import { SensorDetailPage } from '../pages/sensor-detail/sensor-detail';
|
||||
import { MySenseBoxPage } from '../pages/my-sense-box/my-sense-box';
|
||||
|
||||
// For AoT compilation (production builds) we need to have a factory for the loader of translation files.
|
||||
// @TODO: we possibly could optimize this by using a static loader in combination with webpack:
|
||||
|
@ -26,7 +27,8 @@ export function createTranslateLoader(http: HttpClient) {
|
|||
declarations: [
|
||||
openSenseApp,
|
||||
AddItemPage,
|
||||
SensorDetailPage
|
||||
SensorDetailPage,
|
||||
MySenseBoxPage
|
||||
],
|
||||
imports: [
|
||||
HttpClientModule,
|
||||
|
@ -46,7 +48,9 @@ export function createTranslateLoader(http: HttpClient) {
|
|||
entryComponents: [
|
||||
openSenseApp,
|
||||
AddItemPage,
|
||||
SensorDetailPage
|
||||
SensorDetailPage,
|
||||
MySenseBoxPage
|
||||
|
||||
],
|
||||
providers: [
|
||||
StatusBar,
|
||||
|
|
39
src/pages/login/login.html
Normal file
39
src/pages/login/login.html
Normal file
|
@ -0,0 +1,39 @@
|
|||
<ion-header>
|
||||
<ion-navbar>
|
||||
<button ion-button menuToggle>
|
||||
<ion-icon name="menu"></ion-icon>
|
||||
</button>
|
||||
<ion-title>Login</ion-title>
|
||||
</ion-navbar>
|
||||
</ion-header>
|
||||
|
||||
|
||||
<ion-content padding>
|
||||
<ion-grid *ngIf="loading;else nonloading">
|
||||
loading
|
||||
</ion-grid>
|
||||
<ng-template late #nonloading>
|
||||
<ion-card>
|
||||
<ion-grid>
|
||||
<ion-row>
|
||||
<ion-item>
|
||||
<ion-label>userName</ion-label>
|
||||
<ion-input placeholder="userName" [(ngModel)]="userName"></ion-input>
|
||||
</ion-item>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-item>
|
||||
<ion-label>Password</ion-label>
|
||||
<ion-input placeholder="Password" [(ngModel)]="password"></ion-input>
|
||||
</ion-item>
|
||||
</ion-row>
|
||||
<ion-row>
|
||||
<ion-item>
|
||||
<button full ion-button color="secondary" (click)="submitLogin()">Login</button>
|
||||
</ion-item>
|
||||
</ion-row>
|
||||
</ion-grid>
|
||||
</ion-card>
|
||||
</ng-template>
|
||||
</ion-content>
|
||||
|
13
src/pages/login/login.module.ts
Normal file
13
src/pages/login/login.module.ts
Normal file
|
@ -0,0 +1,13 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { IonicPageModule } from 'ionic-angular';
|
||||
import { LoginPage } from './login';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
LoginPage,
|
||||
],
|
||||
imports: [
|
||||
IonicPageModule.forChild(LoginPage),
|
||||
],
|
||||
})
|
||||
export class LoginPageModule {}
|
3
src/pages/login/login.scss
Normal file
3
src/pages/login/login.scss
Normal file
|
@ -0,0 +1,3 @@
|
|||
page-login {
|
||||
|
||||
}
|
33
src/pages/login/login.ts
Normal file
33
src/pages/login/login.ts
Normal file
|
@ -0,0 +1,33 @@
|
|||
import { Component } from '@angular/core';
|
||||
import { IonicPage, NavController, NavParams } from 'ionic-angular';
|
||||
import {MySenseBoxPage} from "../my-sense-box/my-sense-box"
|
||||
/**
|
||||
* Generated class for the LoginPage page.
|
||||
*
|
||||
* See https://ionicframework.com/docs/components/#navigation for more info on
|
||||
* Ionic pages and navigation.
|
||||
*/
|
||||
|
||||
@IonicPage()
|
||||
@Component({
|
||||
selector: 'page-login',
|
||||
templateUrl: 'login.html',
|
||||
})
|
||||
export class LoginPage {
|
||||
userName: string;
|
||||
password: string;
|
||||
public loading=false;
|
||||
constructor(public navCtrl: NavController, public navParams: NavParams) {
|
||||
}
|
||||
|
||||
submitLogin(){
|
||||
this.loading = true;
|
||||
|
||||
//this.navCtrl.push(MySenseBoxPage)
|
||||
}
|
||||
|
||||
ionViewDidLoad() {
|
||||
console.log('ionViewDidLoad LoginPage');
|
||||
}
|
||||
|
||||
}
|
18
src/pages/my-sense-box/my-sense-box.html
Normal file
18
src/pages/my-sense-box/my-sense-box.html
Normal file
|
@ -0,0 +1,18 @@
|
|||
<!--
|
||||
Generated template for the MySenseBoxPage page.
|
||||
|
||||
See http://ionicframework.com/docs/components/#navigation for more info on
|
||||
Ionic pages and navigation.
|
||||
-->
|
||||
<ion-header>
|
||||
|
||||
<ion-navbar>
|
||||
<ion-title>mySenseBox</ion-title>
|
||||
</ion-navbar>
|
||||
|
||||
</ion-header>
|
||||
|
||||
|
||||
<ion-content padding>
|
||||
|
||||
</ion-content>
|
13
src/pages/my-sense-box/my-sense-box.module.ts
Normal file
13
src/pages/my-sense-box/my-sense-box.module.ts
Normal file
|
@ -0,0 +1,13 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { IonicPageModule } from 'ionic-angular';
|
||||
import { MySenseBoxPage } from './my-sense-box';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
MySenseBoxPage,
|
||||
],
|
||||
imports: [
|
||||
IonicPageModule.forChild(MySenseBoxPage),
|
||||
],
|
||||
})
|
||||
export class MySenseBoxPageModule {}
|
3
src/pages/my-sense-box/my-sense-box.scss
Normal file
3
src/pages/my-sense-box/my-sense-box.scss
Normal file
|
@ -0,0 +1,3 @@
|
|||
page-my-sense-box {
|
||||
|
||||
}
|
25
src/pages/my-sense-box/my-sense-box.ts
Normal file
25
src/pages/my-sense-box/my-sense-box.ts
Normal file
|
@ -0,0 +1,25 @@
|
|||
import { Component } from '@angular/core';
|
||||
import { IonicPage, NavController, NavParams } from 'ionic-angular';
|
||||
|
||||
/**
|
||||
* Generated class for the MySenseBoxPage page.
|
||||
*
|
||||
* See https://ionicframework.com/docs/components/#navigation for more info on
|
||||
* Ionic pages and navigation.
|
||||
*/
|
||||
|
||||
@IonicPage()
|
||||
@Component({
|
||||
selector: 'page-my-sense-box',
|
||||
templateUrl: 'my-sense-box.html',
|
||||
})
|
||||
export class MySenseBoxPage {
|
||||
|
||||
constructor(public navCtrl: NavController, public navParams: NavParams) {
|
||||
}
|
||||
|
||||
ionViewDidLoad() {
|
||||
console.log('ionViewDidLoad MySenseBoxPage');
|
||||
}
|
||||
|
||||
}
|
18
src/pages/sensors/sensors.html
Normal file
18
src/pages/sensors/sensors.html
Normal file
|
@ -0,0 +1,18 @@
|
|||
<!--
|
||||
Generated template for the SensorsPage page.
|
||||
|
||||
See http://ionicframework.com/docs/components/#navigation for more info on
|
||||
Ionic pages and navigation.
|
||||
-->
|
||||
<ion-header>
|
||||
|
||||
<ion-navbar>
|
||||
<ion-title>sensors</ion-title>
|
||||
</ion-navbar>
|
||||
|
||||
</ion-header>
|
||||
|
||||
|
||||
<ion-content padding>
|
||||
|
||||
</ion-content>
|
13
src/pages/sensors/sensors.module.ts
Normal file
13
src/pages/sensors/sensors.module.ts
Normal file
|
@ -0,0 +1,13 @@
|
|||
import { NgModule } from '@angular/core';
|
||||
import { IonicPageModule } from 'ionic-angular';
|
||||
import { SensorsPage } from './sensors';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
SensorsPage,
|
||||
],
|
||||
imports: [
|
||||
IonicPageModule.forChild(SensorsPage),
|
||||
],
|
||||
})
|
||||
export class SensorsPageModule {}
|
3
src/pages/sensors/sensors.scss
Normal file
3
src/pages/sensors/sensors.scss
Normal file
|
@ -0,0 +1,3 @@
|
|||
page-sensors {
|
||||
|
||||
}
|
25
src/pages/sensors/sensors.ts
Normal file
25
src/pages/sensors/sensors.ts
Normal file
|
@ -0,0 +1,25 @@
|
|||
import { Component } from '@angular/core';
|
||||
import { IonicPage, NavController, NavParams } from 'ionic-angular';
|
||||
|
||||
/**
|
||||
* Generated class for the SensorsPage page.
|
||||
*
|
||||
* See https://ionicframework.com/docs/components/#navigation for more info on
|
||||
* Ionic pages and navigation.
|
||||
*/
|
||||
|
||||
@IonicPage()
|
||||
@Component({
|
||||
selector: 'page-sensors',
|
||||
templateUrl: 'sensors.html',
|
||||
})
|
||||
export class SensorsPage {
|
||||
|
||||
constructor(public navCtrl: NavController, public navParams: NavParams) {
|
||||
}
|
||||
|
||||
ionViewDidLoad() {
|
||||
console.log('ionViewDidLoad SensorsPage');
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Reference in a new issue