From d021d5183719f0f29f874e9575da3c525540ea63 Mon Sep 17 00:00:00 2001 From: Ash Bhimasani <16abhimasani@gmail.com> Date: Fri, 1 Jun 2018 14:57:33 -0400 Subject: [PATCH] Fixed Problems --- .../components/transaction/transaction.html | 14 +++----- .../components/transaction/transaction.scss | 30 ++-------------- app/src/components/transaction/transaction.ts | 35 ++++++++++--------- app/src/pages/input-output/input-output.scss | 3 -- .../outpoint.html} | 9 +++-- .../outpoint.module.ts} | 10 +++--- app/src/pages/outpoint/outpoint.scss | 3 ++ .../input-output.ts => outpoint/outpoint.ts} | 18 +++++----- 8 files changed, 48 insertions(+), 74 deletions(-) delete mode 100644 app/src/pages/input-output/input-output.scss rename app/src/pages/{input-output/input-output.html => outpoint/outpoint.html} (80%) rename app/src/pages/{input-output/input-output.module.ts => outpoint/outpoint.module.ts} (69%) create mode 100644 app/src/pages/outpoint/outpoint.scss rename app/src/pages/{input-output/input-output.ts => outpoint/outpoint.ts} (77%) diff --git a/app/src/components/transaction/transaction.html b/app/src/components/transaction/transaction.html index 429b159..1c59366 100644 --- a/app/src/components/transaction/transaction.html +++ b/app/src/components/transaction/transaction.html @@ -32,7 +32,7 @@ - +

@@ -48,18 +48,12 @@

- - -
- +

{{ item.scriptSig.asm }}

- - -
@@ -79,7 +73,7 @@ - +

@@ -104,7 +98,7 @@ {{ currency.getConvertedNumber(vout.value) | number:'1.0-8' }} {{ currency.currencySymbol }} (S) - + diff --git a/app/src/components/transaction/transaction.scss b/app/src/components/transaction/transaction.scss index 78d2821..3021c0f 100644 --- a/app/src/components/transaction/transaction.scss +++ b/app/src/components/transaction/transaction.scss @@ -9,8 +9,6 @@ transaction { ion-row { border: 1px solid #f3f3f3; - margin-top: 10px; - margin-bottom: 10px; &.small { font-size: 1.1rem; @@ -26,35 +24,11 @@ transaction { ion-icon { color: rgba(0, 0, 0, 0.25); - margin-right: 5px; } -// New Stuff - -.shiftDown { - padding-top: 1.2em; -} - -.ellipsis { - margin-bottom: .7rem; - margin-top: 8px; -} - -.unlocking-script { - padding-top: .7rem; - max-width: 90%; -} - -.locking-script { - padding-top: .7rem; -} - -//end - .item, .item p { font-size: 1.4rem; - font-weight: bold; } $transaction-item-boarder-radius: 3px; @@ -67,10 +41,10 @@ transaction { border-bottom-right-radius: $transaction-item-boarder-radius; } - .itemHighlight { + .item--state-highlight { background-color: #8dc429; } - .itemNoLight { + .item--state-nolight { background-color: default; } diff --git a/app/src/components/transaction/transaction.ts b/app/src/components/transaction/transaction.ts index a854007..9a7b027 100644 --- a/app/src/components/transaction/transaction.ts +++ b/app/src/components/transaction/transaction.ts @@ -19,8 +19,8 @@ export class TransactionComponent { public expanded: boolean = false; @Input() public tx: any = {}; - @Input() public dr?: string; - @Input() public dx?: number; + @Input() public txDirection?: string; + @Input() public txIndex?: number; constructor(private navCtrl: NavController, public currency: CurrencyProvider) { } @@ -39,20 +39,23 @@ export class TransactionComponent { }); } - public goToInput(txId: string, dxNm: number): void { - this.navCtrl.push('input-output', { - 'txId': txId, - 'dir': '<', - 'dxNm': dxNm - }); - } - - public goToOutput(txId: string, dxNm: number): void { - this.navCtrl.push('input-output', { - 'txId': txId, - 'dir': '>', - 'dxNm': dxNm - }); + public goToOutpoint(txId: string, txDirection: string, txIndex: number): void { + // output page + if (txDirection === '>') { + this.navCtrl.push('outpoint', { + 'txId': txId, + 'txDirection': '>', + 'txIndex': txIndex + }); + } + // input page + if (txDirection === '<') { + this.navCtrl.push('outpoint', { + 'txId': txId, + 'txDirection': '<', + 'txIndex': txIndex + }); + } } public goToAddress(addrStr: string): void { diff --git a/app/src/pages/input-output/input-output.scss b/app/src/pages/input-output/input-output.scss deleted file mode 100644 index a447548..0000000 --- a/app/src/pages/input-output/input-output.scss +++ /dev/null @@ -1,3 +0,0 @@ -page-input-output { - -} diff --git a/app/src/pages/input-output/input-output.html b/app/src/pages/outpoint/outpoint.html similarity index 80% rename from app/src/pages/input-output/input-output.html rename to app/src/pages/outpoint/outpoint.html index 0f559f1..313917c 100644 --- a/app/src/pages/input-output/input-output.html +++ b/app/src/pages/outpoint/outpoint.html @@ -9,8 +9,11 @@

-

Output Transaction | Index #{{ dxNm }}

-

Input Transaction | Index #{{ dxNm }}

+

+ Input + Output + Transaction | Index #{{ txIndex }} +

Transaction Hash {{ tx.txid }}

@@ -52,7 +55,7 @@

Details

- +
diff --git a/app/src/pages/input-output/input-output.module.ts b/app/src/pages/outpoint/outpoint.module.ts similarity index 69% rename from app/src/pages/input-output/input-output.module.ts rename to app/src/pages/outpoint/outpoint.module.ts index f2a3401..c53cd70 100644 --- a/app/src/pages/input-output/input-output.module.ts +++ b/app/src/pages/outpoint/outpoint.module.ts @@ -1,20 +1,20 @@ import { NgModule } from '@angular/core'; import { IonicPageModule } from 'ionic-angular'; -import { InputOutputPage } from './input-output'; +import { OutpointPage } from './outpoint'; import { TransactionComponentModule } from '../../components/transaction/transaction.module'; import { HeadNavComponentModule } from '../../components/head-nav/head-nav.module'; @NgModule({ declarations: [ - InputOutputPage + OutpointPage ], imports: [ - IonicPageModule.forChild(InputOutputPage), + IonicPageModule.forChild(OutpointPage), TransactionComponentModule, HeadNavComponentModule ], exports: [ - InputOutputPage + OutpointPage ] }) -export class InputOutputPageModule {} +export class OutpointPageModule {} diff --git a/app/src/pages/outpoint/outpoint.scss b/app/src/pages/outpoint/outpoint.scss new file mode 100644 index 0000000..adade81 --- /dev/null +++ b/app/src/pages/outpoint/outpoint.scss @@ -0,0 +1,3 @@ +page-outpoint { + +} diff --git a/app/src/pages/input-output/input-output.ts b/app/src/pages/outpoint/outpoint.ts similarity index 77% rename from app/src/pages/input-output/input-output.ts rename to app/src/pages/outpoint/outpoint.ts index d94751b..b64a75a 100644 --- a/app/src/pages/input-output/input-output.ts +++ b/app/src/pages/outpoint/outpoint.ts @@ -10,25 +10,25 @@ import { ApiProvider } from '../../providers/api/api'; * on Ionic pages and navigation. */ @IonicPage({ - name: 'input-output', - segment: 'tx/:txId/:dir/:dxNm' + name: 'outpoint', + segment: 'tx/:txId/:txDirection/:txIndex' }) @Component({ - selector: 'page-input-output', - templateUrl: 'input-output.html' + selector: 'page-outpoint', + templateUrl: 'outpoint.html' }) -export class InputOutputPage { +export class OutpointPage { public loading: boolean = true; private txId: string; - public dxNm: number; - public dir: string; + public txIndex: number; + public txDirection: string; public tx: any = {}; constructor(public navCtrl: NavController, public navParams: NavParams, private http: Http, private api: ApiProvider) { this.txId = navParams.get('txId'); - this.dxNm = Number(navParams.get('dxNm')); - this.dir = navParams.get('dir'); + this.txIndex = Number(navParams.get('txIndex')); + this.txDirection = navParams.get('txDirection'); } public ionViewDidLoad(): void {