From 879b87f2a6e056b6515546359586f5f3d6c1fd9e Mon Sep 17 00:00:00 2001 From: Darren Nelsen Date: Thu, 17 Aug 2017 11:47:31 -0400 Subject: [PATCH] added LatestTransactions and LatestBlocks components with simple placeholders --- app/package.json | 2 +- .../latest-blocks/latest-blocks.html | 4 ++++ .../latest-blocks/latest-blocks.module.ts | 16 ++++++++++++++ .../latest-blocks/latest-blocks.scss | 3 +++ .../components/latest-blocks/latest-blocks.ts | 22 +++++++++++++++++++ .../latest-transactions.html | 4 ++++ .../latest-transactions.module.ts | 16 ++++++++++++++ .../latest-transactions.scss | 3 +++ .../latest-transactions.ts | 22 +++++++++++++++++++ app/src/pages/blocksPage/blocksPage.ts | 2 ++ app/src/pages/home/home.html | 11 ++++++++-- app/src/pages/home/home.module.ts | 4 +++- app/src/pages/pages.module.ts | 10 ++++++++- 13 files changed, 114 insertions(+), 5 deletions(-) create mode 100644 app/src/components/latest-blocks/latest-blocks.html create mode 100644 app/src/components/latest-blocks/latest-blocks.module.ts create mode 100644 app/src/components/latest-blocks/latest-blocks.scss create mode 100644 app/src/components/latest-blocks/latest-blocks.ts create mode 100644 app/src/components/latest-transactions/latest-transactions.html create mode 100644 app/src/components/latest-transactions/latest-transactions.module.ts create mode 100644 app/src/components/latest-transactions/latest-transactions.scss create mode 100644 app/src/components/latest-transactions/latest-transactions.ts diff --git a/app/package.json b/app/package.json index ca2960b..ef5ad15 100644 --- a/app/package.json +++ b/app/package.json @@ -42,7 +42,7 @@ "@types/jasmine": "2.5.41", "@types/node": "7.0.4", "codecov": "2.2.0", - "ionic": "3.9.0", + "ionic": "3.9.1", "jasmine-core": "2.5.2", "jasmine-spec-reporter": "3.2.0", "karma": "1.4.1", diff --git a/app/src/components/latest-blocks/latest-blocks.html b/app/src/components/latest-blocks/latest-blocks.html new file mode 100644 index 0000000..5d363cc --- /dev/null +++ b/app/src/components/latest-blocks/latest-blocks.html @@ -0,0 +1,4 @@ + +
+ {{text}} +
diff --git a/app/src/components/latest-blocks/latest-blocks.module.ts b/app/src/components/latest-blocks/latest-blocks.module.ts new file mode 100644 index 0000000..535f515 --- /dev/null +++ b/app/src/components/latest-blocks/latest-blocks.module.ts @@ -0,0 +1,16 @@ +import { NgModule } from '@angular/core'; +import { IonicModule } from 'ionic-angular'; +import { LatestBlocksComponent } from './latest-blocks'; + +@NgModule({ + declarations: [ + LatestBlocksComponent + ], + imports: [ + IonicModule + ], + exports: [ + LatestBlocksComponent + ] +}) +export class LatestBlocksComponentModule {} diff --git a/app/src/components/latest-blocks/latest-blocks.scss b/app/src/components/latest-blocks/latest-blocks.scss new file mode 100644 index 0000000..f5def0b --- /dev/null +++ b/app/src/components/latest-blocks/latest-blocks.scss @@ -0,0 +1,3 @@ +latest-blocks { + +} diff --git a/app/src/components/latest-blocks/latest-blocks.ts b/app/src/components/latest-blocks/latest-blocks.ts new file mode 100644 index 0000000..db25c56 --- /dev/null +++ b/app/src/components/latest-blocks/latest-blocks.ts @@ -0,0 +1,22 @@ +import { Component } from '@angular/core'; + +/** + * Generated class for the LatestBlocksComponent component. + * + * See https://angular.io/docs/ts/latest/api/core/index/ComponentMetadata-class.html + * for more info on Angular Components. + */ +@Component({ + selector: 'latest-blocks', + templateUrl: 'latest-blocks.html' +}) +export class LatestBlocksComponent { + + private text: string; + + constructor() { + console.log('Hello LatestBlocksComponent Component'); + this.text = 'Hello Latest Blocks'; + } + +} diff --git a/app/src/components/latest-transactions/latest-transactions.html b/app/src/components/latest-transactions/latest-transactions.html new file mode 100644 index 0000000..948536e --- /dev/null +++ b/app/src/components/latest-transactions/latest-transactions.html @@ -0,0 +1,4 @@ + +
+ {{text}} +
diff --git a/app/src/components/latest-transactions/latest-transactions.module.ts b/app/src/components/latest-transactions/latest-transactions.module.ts new file mode 100644 index 0000000..7eb0b92 --- /dev/null +++ b/app/src/components/latest-transactions/latest-transactions.module.ts @@ -0,0 +1,16 @@ +import { NgModule } from '@angular/core'; +import { IonicModule } from 'ionic-angular'; +import { LatestTransactionsComponent } from './latest-transactions'; + +@NgModule({ + declarations: [ + LatestTransactionsComponent + ], + imports: [ + IonicModule + ], + exports: [ + LatestTransactionsComponent + ] +}) +export class LatestTransactionsComponentModule {} diff --git a/app/src/components/latest-transactions/latest-transactions.scss b/app/src/components/latest-transactions/latest-transactions.scss new file mode 100644 index 0000000..570ea96 --- /dev/null +++ b/app/src/components/latest-transactions/latest-transactions.scss @@ -0,0 +1,3 @@ +latest-transactions { + +} diff --git a/app/src/components/latest-transactions/latest-transactions.ts b/app/src/components/latest-transactions/latest-transactions.ts new file mode 100644 index 0000000..5b8d68e --- /dev/null +++ b/app/src/components/latest-transactions/latest-transactions.ts @@ -0,0 +1,22 @@ +import { Component } from '@angular/core'; + +/** + * Generated class for the LatestTransactionsComponent component. + * + * See https://angular.io/docs/ts/latest/api/core/index/ComponentMetadata-class.html + * for more info on Angular Components. + */ +@Component({ + selector: 'latest-transactions', + templateUrl: 'latest-transactions.html' +}) +export class LatestTransactionsComponent { + + private text: string; + + constructor() { + console.log('Hello LatestTransactionsComponent Component'); + this.text = 'Hello Latest Transactions'; + } + +} diff --git a/app/src/pages/blocksPage/blocksPage.ts b/app/src/pages/blocksPage/blocksPage.ts index 5f2eeaf..b48f130 100644 --- a/app/src/pages/blocksPage/blocksPage.ts +++ b/app/src/pages/blocksPage/blocksPage.ts @@ -14,6 +14,8 @@ export class BlocksPage { public blocks: Observable; constructor(private navCtrl: NavController, private blocksService: BlocksService) { + // TODO Put loading spinner on page + this.title = 'Blocks'; this.blocks = blocksService.latestBlocks; this.blocks.subscribe((blocks) => { diff --git a/app/src/pages/home/home.html b/app/src/pages/home/home.html index 5930d47..b29ea51 100644 --- a/app/src/pages/home/home.html +++ b/app/src/pages/home/home.html @@ -11,8 +11,15 @@ -

Latest Blocks

-

Latest Transactions

+
+

Latest Blocks

+ +
+ +
+

Latest Transactions

+ +

About

diff --git a/app/src/pages/home/home.module.ts b/app/src/pages/home/home.module.ts index 9a8ed53..b3d3a15 100644 --- a/app/src/pages/home/home.module.ts +++ b/app/src/pages/home/home.module.ts @@ -2,6 +2,7 @@ import { NgModule } from '@angular/core'; import { IonicPageModule } from 'ionic-angular'; import { HomePage } from './home'; import { HeadNavComponentModule } from '../../components/head-nav/head-nav.module'; +import { LatestTransactionsComponentModule } from '../../components/latest-transactions/latest-transactions.module'; @NgModule({ declarations: [ @@ -9,7 +10,8 @@ import { HeadNavComponentModule } from '../../components/head-nav/head-nav.modul ], imports: [ IonicPageModule.forChild(HomePage), - HeadNavComponentModule + HeadNavComponentModule, + LatestTransactionsComponentModule ], exports: [ HomePage diff --git a/app/src/pages/pages.module.ts b/app/src/pages/pages.module.ts index b76bdd6..4787ac8 100644 --- a/app/src/pages/pages.module.ts +++ b/app/src/pages/pages.module.ts @@ -2,6 +2,8 @@ import { NgModule } from '@angular/core'; import { IonicModule } from 'ionic-angular'; import { ComponentsModule } from '../components'; import { HeadNavComponentModule } from '../components/head-nav/head-nav.module'; +import { LatestTransactionsComponentModule } from '../components/latest-transactions/latest-transactions.module'; +import { LatestBlocksComponentModule } from '../components/latest-blocks/latest-blocks.module'; import { HomePage, BlocksPage, @@ -18,7 +20,13 @@ import { NodeStatusPage, VerifyMessagePage ], - imports: [ IonicModule, ComponentsModule, HeadNavComponentModule ], + imports: [ + IonicModule, + ComponentsModule, + HeadNavComponentModule, + LatestTransactionsComponentModule, + LatestBlocksComponentModule + ], exports: [ // CustomComponent, ],