fix styles and navigation

This commit is contained in:
JDonadio 2017-08-17 15:19:52 -03:00
parent 8f36bc6ad6
commit 8da659b965
No known key found for this signature in database
GPG Key ID: EC1F4E04B2BFA730
5 changed files with 19 additions and 15 deletions

View File

@ -1,5 +1,5 @@
import { Component } from '@angular/core'; import { Component } from '@angular/core';
import { IonicPage, ViewController, NavParams } from 'ionic-angular'; import { IonicPage, ViewController } from 'ionic-angular';
@IonicPage() @IonicPage()
@Component({ @Component({
@ -8,7 +8,7 @@ import { IonicPage, ViewController, NavParams } from 'ionic-angular';
}) })
export class BackupConfirmModalPage { export class BackupConfirmModalPage {
constructor(public viewCtrl: ViewController, public navParams: NavParams) { constructor(public viewCtrl: ViewController) {
} }
ionViewDidLoad() { ionViewDidLoad() {

View File

@ -1,9 +1,3 @@
<!--
Generated template for the BackupGamePage page.
See http://ionicframework.com/docs/components/#navigation for more info on
Ionic pages and navigation.
-->
<ion-header> <ion-header>
<ion-navbar class="navbarc"> <ion-navbar class="navbarc">

View File

@ -1,5 +1,5 @@
import { Component, ViewChild } from '@angular/core'; import { Component, ViewChild } from '@angular/core';
import { IonicPage, NavController, NavParams, Slides, Navbar, AlertController, ModalController } from 'ionic-angular'; import { IonicPage, NavController, Slides, Navbar, AlertController, ModalController, Modal } from 'ionic-angular';
import * as _ from 'lodash'; import * as _ from 'lodash';
@IonicPage() @IonicPage()
@ -24,7 +24,7 @@ export class BackupGamePage {
private keys: any; private keys: any;
private useIdeograms: any; private useIdeograms: any;
constructor(public navCtrl: NavController, public navParams: NavParams, public alertCtrl: AlertController, public modalCtrl: ModalController) { constructor(public navCtrl: NavController, public alertCtrl: AlertController, public modalCtrl: ModalController) {
// TODO replace for the original wallet object // TODO replace for the original wallet object
this.wallet = { this.wallet = {
name: 'Wallet name', name: 'Wallet name',
@ -197,12 +197,19 @@ export class BackupGamePage {
}); });
alert.present(); alert.present();
} else { } else {
const myModal = this.modalCtrl.create('BackupConfirmModalPage', {}, { let self = this;
const myModal: Modal = self.modalCtrl.create('BackupConfirmModalPage', {}, {
showBackdrop: true, showBackdrop: true,
enableBackdropDismiss: true, enableBackdropDismiss: true,
cssClass: "backup-modal-success" cssClass: "backup-modal-success"
}); });
myModal.present(); myModal.present();
myModal.onDidDismiss(() => {
console.log('MODAL DISSMISED');
self.navCtrl.popToRoot(); // TODO NOT WORKING
});
} }
}; };

View File

@ -1,5 +1,5 @@
import { Component } from '@angular/core'; import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams, ViewController } from 'ionic-angular'; import { IonicPage, NavController, ViewController } from 'ionic-angular';
@IonicPage() @IonicPage()
@Component({ @Component({
@ -8,7 +8,7 @@ import { IonicPage, NavController, NavParams, ViewController } from 'ionic-angul
}) })
export class BackupWarningModalPage { export class BackupWarningModalPage {
constructor(public navCtrl: NavController, public navParams: NavParams, public viewCtrl: ViewController) { constructor(public navCtrl: NavController, public viewCtrl: ViewController) {
} }
ionViewDidLoad() { ionViewDidLoad() {

View File

@ -14,11 +14,14 @@ export class BackupWarningPage {
} }
ionViewDidLoad() { ionViewDidLoad() {
console.log('ionViewDidLoad BackupWarningPage');
} }
openWarningModal() { openWarningModal() {
const myModal = this.modalCtrl.create('BackupWarningModalPage', {}, { showBackdrop: true, enableBackdropDismiss: true, cssClass: "backup-modal-warning" }); const myModal = this.modalCtrl.create('BackupWarningModalPage', {}, {
showBackdrop: true,
enableBackdropDismiss: true,
cssClass: "backup-modal-warning"
});
myModal.present(); myModal.present();
} }