Merge pull request #6848 from JDonadio/new/add-view

New Add Page
This commit is contained in:
Gabriel Edgardo Bazán 2017-10-04 11:59:25 -03:00 committed by GitHub
commit 86a8b0b7e9
7 changed files with 78 additions and 7 deletions

View File

@ -24,6 +24,7 @@ import { TranslatePoHttpLoader } from '@biesbjerg/ngx-translate-po-http-loader';
import { CopayApp } from './app.component';
/* Pages */
import { AddPage } from '../pages/add/add';
import { BackupRequestPage } from '../pages/onboarding/backup-request/backup-request';
import { DisclaimerPage } from '../pages/onboarding/disclaimer/disclaimer';
import { EmailPage } from '../pages/onboarding/email/email';
@ -73,6 +74,7 @@ export function createTranslateLoader(http: Http) {
}
let pages: any = [
AddPage,
AboutPage,
AdvancedPage,
AltCurrencyPage,

31
src/pages/add/add.html Normal file
View File

@ -0,0 +1,31 @@
<ion-header>
<ion-navbar>
<ion-title>Add Wallet</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding>
<ion-card>
<ion-item (click)="goToSingleWallet()" detail-push>
<span translate>New personal wallet</span>
</ion-item>
</ion-card>
<ion-card>
<ion-item (click)="goToSharedWallet()" detail-push>
<span translate>Create shared wallet</span>
</ion-item>
</ion-card>
<ion-card>
<ion-item (click)="goToJoinWallet()" detail-push>
<span translate>Join shared wallet</span>
</ion-item>
</ion-card>
<ion-card>
<ion-item (click)="goToImportWallet()" detail-push>
<span translate>Import wallet</span>
</ion-item>
</ion-card>
</ion-content>

0
src/pages/add/add.scss Normal file
View File

30
src/pages/add/add.ts Normal file
View File

@ -0,0 +1,30 @@
import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
@Component({
selector: 'page-add',
templateUrl: 'add.html'
})
export class AddPage {
constructor(public navCtrl: NavController) {}
ionViewDidLoad() {
console.log('ionViewDidLoad AddPage');
}
goToSingleWallet() {
// this.navCtrl.push();
}
goToSharedeWallet() {
// this.navCtrl.push();
}
goToJoinWallet() {
// this.navCtrl.push();
}
goToImportWallet() {
// this.navCtrl.push();
}
}

View File

@ -5,6 +5,14 @@
</ion-header>
<ion-content padding>
<div *ngIf="!wallets || !wallets[0]">
<ion-card (click)="goToAddView()">
<ion-item detail-push>
<span translate>Create a new wallet</span>
</ion-item>
</ion-card>
</div>
<ion-card *ngFor="let wallet of wallets">
<ion-card-header>
{{wallet.credentials.walletName}} {{wallet.credentials.m}}-{{wallet.credentials.n}}

View File

@ -1,5 +1,6 @@
import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
import { AddPage } from "../add/add";
import { ProfileProvider } from '../../providers/profile/profile';
import { LatestReleaseProvider } from '../../providers/latestRelease/latestRelease';
@ -28,4 +29,8 @@ export class HomePage {
});
console.log('[home.ts:20]', this.wallets); //TODO
}
goToAddView() {
this.navCtrl.push(AddPage);
}
}

View File

@ -5,16 +5,13 @@
// roboto, and noto sans fonts
$font-path: "../assets/fonts";
// The app direction is used to include
// rtl styles in your app. For more info, please see:
// http://ionicframework.com/docs/theming/rtl-support/
$app-direction: ltr;
@import "ionic.globals";
// Shared Variables
// --------------------------------------------------
// To customize the look and feel of this app, you can override
@ -23,8 +20,6 @@ $app-direction: ltr;
// http://ionicframework.com/docs/theming/overriding-ionic-variables/
// Named Color Variables
// --------------------------------------------------
// Named colors makes it easy to reuse colors on various components.
@ -77,13 +72,13 @@ $v-visible-radius: 6px !default;
// --------------------------------------------------
// Material Design only Sass variables can go here
$item-md-detail-push-show: true;
// App Windows Variables
// --------------------------------------------------
// Windows only Sass variables can go here
$item-wp-detail-push-show: true;