From 7d2b27be7d6b5e81c9d780607d75f50eee845eab Mon Sep 17 00:00:00 2001 From: Darren Nelsen Date: Tue, 15 Aug 2017 16:36:11 -0400 Subject: [PATCH 1/3] added toggle to searchbar; made text selectable --- app/ionic.config.json | 3 ++- app/package.json | 2 +- app/src/app/app.scss | 4 ++++ app/src/components/head-nav/head-nav.html | 4 ++-- app/src/components/head-nav/head-nav.ts | 6 ++++++ app/src/pages/block-detail/block-detail.html | 2 +- app/src/providers/api/api.ts | 2 +- 7 files changed, 17 insertions(+), 6 deletions(-) diff --git a/app/ionic.config.json b/app/ionic.config.json index b8ac8d6..1c03d6d 100644 --- a/app/ionic.config.json +++ b/app/ionic.config.json @@ -1,5 +1,6 @@ { "name": "insight-ui", "app_id": "", - "type": "ionic-angular" + "type": "ionic-angular", + "integrations": {} } diff --git a/app/package.json b/app/package.json index 1701978..88b33c8 100644 --- a/app/package.json +++ b/app/package.json @@ -43,7 +43,7 @@ "@types/jasmine": "2.5.41", "@types/node": "7.0.4", "codecov": "2.2.0", - "ionic": "3.7.0", + "ionic": "3.8.1", "jasmine-core": "2.5.2", "jasmine-spec-reporter": "3.2.0", "karma": "1.4.1", diff --git a/app/src/app/app.scss b/app/src/app/app.scss index 6e2f3a9..e254df4 100644 --- a/app/src/app/app.scss +++ b/app/src/app/app.scss @@ -25,6 +25,10 @@ font-size: 1.4rem; } +body { + user-select: text; +} + // Shared Sass variables, which can be used to adjust Ionic's // default Sass variables, belong in "theme/variables.scss". // diff --git a/app/src/components/head-nav/head-nav.html b/app/src/components/head-nav/head-nav.html index e7f73fd..1d5ff08 100644 --- a/app/src/components/head-nav/head-nav.html +++ b/app/src/components/head-nav/head-nav.html @@ -7,9 +7,9 @@ - - + diff --git a/app/src/components/head-nav/head-nav.ts b/app/src/components/head-nav/head-nav.ts index 5333728..b3122b6 100644 --- a/app/src/components/head-nav/head-nav.ts +++ b/app/src/components/head-nav/head-nav.ts @@ -18,6 +18,7 @@ import { ActionSheetController } from 'ionic-angular'; }) export class HeadNavComponent { + public showSearch: boolean = false; public loading: boolean; @Input() public title: string; public q: string; @@ -27,6 +28,7 @@ export class HeadNavComponent { } public search(): void { + this.showSearch = false; let apiPrefix: string = this.api.apiPrefix; this.http.get(apiPrefix + 'block/' + this.q).subscribe( @@ -136,4 +138,8 @@ export class HeadNavComponent { }); actionSheet.present(); } + + public toggleSearch() { + this.showSearch = !this.showSearch; + } } diff --git a/app/src/pages/block-detail/block-detail.html b/app/src/pages/block-detail/block-detail.html index daa0444..a20d197 100644 --- a/app/src/pages/block-detail/block-detail.html +++ b/app/src/pages/block-detail/block-detail.html @@ -35,7 +35,7 @@ Mined by - + {{ block.poolInfo.poolName }} diff --git a/app/src/providers/api/api.ts b/app/src/providers/api/api.ts index 31c1966..a15b48e 100644 --- a/app/src/providers/api/api.ts +++ b/app/src/providers/api/api.ts @@ -11,7 +11,7 @@ import 'rxjs/add/operator/map'; @Injectable() export class ApiProvider { - public apiPrefix: string = 'http://localhost:3001/insight-api/'; + public apiPrefix: string = 'https://insight.bitpay.com/api/'; constructor(public http: Http) { } From 90379522fe3324abcac4cc781ccded3db8440c1f Mon Sep 17 00:00:00 2001 From: Darren Nelsen Date: Wed, 16 Aug 2017 11:11:20 -0400 Subject: [PATCH 2/3] added spinner to block detail --- app/src/pages/block-detail/block-detail.html | 180 ++++++++++--------- 1 file changed, 93 insertions(+), 87 deletions(-) diff --git a/app/src/pages/block-detail/block-detail.html b/app/src/pages/block-detail/block-detail.html index a20d197..aaebe36 100644 --- a/app/src/pages/block-detail/block-detail.html +++ b/app/src/pages/block-detail/block-detail.html @@ -3,96 +3,102 @@ -

Block #{{ block.height }}

-

BlockHash {{ block.hash }}

- -

Summary

- - - - Number of Transactions - - {{ block.tx.length }} - - - - Height - - {{ block.height }} (Mainchain) - - - - Block Reward - - {{ currency.getConversion(block.reward) }} - - - - Timestamp - - {{ block.time * 1000 | date:'medium' }} - - - - Mined by - - {{ block.poolInfo.poolName }} - - - - Merkle Root - - {{ block.merkleroot }} - - - - Previous Block - - {{ block.height - 1 }} - - - - Difficulty - - {{ block.difficulty }} - - - - Bits - - {{ block.bits }} - - - - Size (bytes) - - {{ block.size }} - - - - Version - - {{ block.version }} - - - - Nonce - - {{ block.nonce }} - - - - Next Block - - {{ block.height + 1 }} - - - +
+ +
-

Transactions

+

Block #{{ block.height }}

+

BlockHash {{ block.hash }}

- +

Summary

+ + + + Number of Transactions + + {{ block.tx.length }} + + + + Height + + {{ block.height }} (Mainchain) + + + + Block Reward + + {{ currency.getConversion(block.reward) }} + + + + Timestamp + + {{ block.time * 1000 | date:'medium' }} + + + + Mined by + + {{ block.poolInfo.poolName }} + + + + Merkle Root + + {{ block.merkleroot }} + + + + Previous Block + + {{ block.height - 1 }} + + + + Difficulty + + {{ block.difficulty }} + + + + Bits + + {{ block.bits }} + + + + Size (bytes) + + {{ block.size }} + + + + Version + + {{ block.version }} + + + + Nonce + + {{ block.nonce }} + + + + Next Block + + {{ block.height + 1 }} + + + + +
+

Transactions

+ + +
From c9a1b6b153275f433f58e72fedd6aca9a98e8ff4 Mon Sep 17 00:00:00 2001 From: Darren Nelsen Date: Wed, 16 Aug 2017 12:46:08 -0400 Subject: [PATCH 3/3] added spinners to transaction and address pages and transaction list component --- app/src/components/head-nav/head-nav.ts | 2 +- .../transaction-list/transaction-list.html | 21 +++-- app/src/pages/address/address.html | 76 ++++++++++--------- app/src/pages/transaction/transaction.html | 68 +++++++++-------- 4 files changed, 93 insertions(+), 74 deletions(-) diff --git a/app/src/components/head-nav/head-nav.ts b/app/src/components/head-nav/head-nav.ts index b3122b6..664e77e 100644 --- a/app/src/components/head-nav/head-nav.ts +++ b/app/src/components/head-nav/head-nav.ts @@ -139,7 +139,7 @@ export class HeadNavComponent { actionSheet.present(); } - public toggleSearch() { + public toggleSearch(): void { this.showSearch = !this.showSearch; } } diff --git a/app/src/components/transaction-list/transaction-list.html b/app/src/components/transaction-list/transaction-list.html index 6620fc2..9c0a459 100644 --- a/app/src/components/transaction-list/transaction-list.html +++ b/app/src/components/transaction-list/transaction-list.html @@ -1,7 +1,14 @@ - - - - - - - +
+ +
+ + +
+ + + + + + + +
diff --git a/app/src/pages/address/address.html b/app/src/pages/address/address.html index 752120a..4dfc4d7 100644 --- a/app/src/pages/address/address.html +++ b/app/src/pages/address/address.html @@ -3,45 +3,51 @@ -

Address

-

Address {{ address.addrStr }}

-

{{ currency.getConversion(address.balance) }}

+
+ +
-

Summary

+
+

Address

+

Address {{ address.addrStr }}

+

{{ currency.getConversion(address.balance) }}

- - - Total Received - - {{ currency.getConversion(address.totalReceived) }} - - - - Total Sent - - {{ currency.getConversion(address.totalSent) }} - - - - Final Balance - - {{ currency.getConversion(address.balance) }} - - - - No. Transactions - - {{ address.txApperances }} - - - +

Summary

-

- -

+ + + Total Received + + {{ currency.getConversion(address.totalReceived) }} + + + + Total Sent + + {{ currency.getConversion(address.totalSent) }} + + + + Final Balance + + {{ currency.getConversion(address.balance) }} + + + + No. Transactions + + {{ address.txApperances }} + + + -

Transactions

+

+ +

- +

Transactions

+ + +
diff --git a/app/src/pages/transaction/transaction.html b/app/src/pages/transaction/transaction.html index bed9bd1..7f904dc 100644 --- a/app/src/pages/transaction/transaction.html +++ b/app/src/pages/transaction/transaction.html @@ -3,40 +3,46 @@ -

Transaction

-

Transaction {{ tx.txid }}

+
+ +
-

Summary

+
+

Transaction

+

Transaction {{ tx.txid }}

- - - Size - - {{ tx.size }} (bytes) - - - - Received Time - - {{ tx.time * 1000 | date:'medium' }} - - - - Mined Time - - {{ tx.blocktime * 1000 | date:'medium' }} - - - - Included in Block - - {{ tx.blockhash }} - - - +

Summary

-

Details

+ + + Size + + {{ tx.size }} (bytes) + + + + Received Time + + {{ tx.time * 1000 | date:'medium' }} + + + + Mined Time + + {{ tx.blocktime * 1000 | date:'medium' }} + + + + Included in Block + + {{ tx.blockhash }} + + + - +

Details

+ + +