Fixed Problems
This commit is contained in:
parent
7297a232bc
commit
d021d51837
@ -32,7 +32,7 @@
|
|||||||
</ion-list>
|
</ion-list>
|
||||||
|
|
||||||
<ion-list [hidden]="tx.isCoinBase">
|
<ion-list [hidden]="tx.isCoinBase">
|
||||||
<ion-item *ngFor="let vin of aggregateItems(tx.vin); let i = index" [ngClass]="[i === dx && dr === '<' ? 'itemHighlight' : 'itemNoLight']">
|
<ion-item *ngFor="let vin of aggregateItems(tx.vin); let i = index" [ngClass]="[i === txIndex && txDirection === '<' ? 'item--state-highlight' : 'item--state-nolight']">
|
||||||
<div>
|
<div>
|
||||||
<div class="ellipsis">
|
<div class="ellipsis">
|
||||||
<p>
|
<p>
|
||||||
@ -48,18 +48,12 @@
|
|||||||
</p>
|
</p>
|
||||||
<div *ngFor="let item of vin.items">
|
<div *ngFor="let item of vin.items">
|
||||||
<div *ngIf="item.scriptSig">
|
<div *ngIf="item.scriptSig">
|
||||||
|
|
||||||
<!-- <div *ngFor="let scriptSig of item.scriptSig.asm"> -->
|
|
||||||
|
|
||||||
<div class="unlocking-script">
|
<div class="unlocking-script">
|
||||||
<a (click)="goToOutput(item.txid, item.vout)">
|
<a (click)="goToOutpoint(item.txid,'>', item.vout)">
|
||||||
<ion-icon name="arrow-dropleft-circle"></ion-icon>
|
<ion-icon name="arrow-dropleft-circle"></ion-icon>
|
||||||
</a>
|
</a>
|
||||||
<p>{{ item.scriptSig.asm }}</p>
|
<p>{{ item.scriptSig.asm }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- </div> -->
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -79,7 +73,7 @@
|
|||||||
|
|
||||||
<ion-col col-12 col-md-6>
|
<ion-col col-12 col-md-6>
|
||||||
<ion-list>
|
<ion-list>
|
||||||
<ion-item *ngFor="let vout of tx.vout; let i = index" [ngClass]="[i === dx && dr === '>' ? 'itemHighlight' : 'itemNoLight']">
|
<ion-item *ngFor="let vout of tx.vout; let i = index" [ngClass]="[i === txIndex && txDirection === '>' ? 'item--state-highlight' : 'item--state-nolight']">
|
||||||
<div>
|
<div>
|
||||||
<div class="ellipsis">
|
<div class="ellipsis">
|
||||||
<p>
|
<p>
|
||||||
@ -104,7 +98,7 @@
|
|||||||
{{ currency.getConvertedNumber(vout.value) | number:'1.0-8' }} {{ currency.currencySymbol }}
|
{{ currency.getConvertedNumber(vout.value) | number:'1.0-8' }} {{ currency.currencySymbol }}
|
||||||
<span [hidden]="!vout.spentTxId">
|
<span [hidden]="!vout.spentTxId">
|
||||||
(S)
|
(S)
|
||||||
<a (click)="goToInput(vout.spentTxId, vout.spentIndex)" [hidden]="!expanded">
|
<a (click)="goToOutpoint(vout.spentTxId, '<', vout.spentIndex)" [hidden]="!expanded">
|
||||||
<ion-icon name="arrow-dropright-circle"></ion-icon>
|
<ion-icon name="arrow-dropright-circle"></ion-icon>
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@ -9,8 +9,6 @@ transaction {
|
|||||||
|
|
||||||
ion-row {
|
ion-row {
|
||||||
border: 1px solid #f3f3f3;
|
border: 1px solid #f3f3f3;
|
||||||
margin-top: 10px;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
|
|
||||||
&.small {
|
&.small {
|
||||||
font-size: 1.1rem;
|
font-size: 1.1rem;
|
||||||
@ -26,35 +24,11 @@ transaction {
|
|||||||
|
|
||||||
ion-icon {
|
ion-icon {
|
||||||
color: rgba(0, 0, 0, 0.25);
|
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,
|
||||||
.item p {
|
.item p {
|
||||||
font-size: 1.4rem;
|
font-size: 1.4rem;
|
||||||
font-weight: bold;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$transaction-item-boarder-radius: 3px;
|
$transaction-item-boarder-radius: 3px;
|
||||||
@ -67,10 +41,10 @@ transaction {
|
|||||||
border-bottom-right-radius: $transaction-item-boarder-radius;
|
border-bottom-right-radius: $transaction-item-boarder-radius;
|
||||||
}
|
}
|
||||||
|
|
||||||
.itemHighlight {
|
.item--state-highlight {
|
||||||
background-color: #8dc429;
|
background-color: #8dc429;
|
||||||
}
|
}
|
||||||
.itemNoLight {
|
.item--state-nolight {
|
||||||
background-color: default;
|
background-color: default;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -19,8 +19,8 @@ export class TransactionComponent {
|
|||||||
|
|
||||||
public expanded: boolean = false;
|
public expanded: boolean = false;
|
||||||
@Input() public tx: any = {};
|
@Input() public tx: any = {};
|
||||||
@Input() public dr?: string;
|
@Input() public txDirection?: string;
|
||||||
@Input() public dx?: number;
|
@Input() public txIndex?: number;
|
||||||
|
|
||||||
constructor(private navCtrl: NavController, public currency: CurrencyProvider) {
|
constructor(private navCtrl: NavController, public currency: CurrencyProvider) {
|
||||||
}
|
}
|
||||||
@ -39,20 +39,23 @@ export class TransactionComponent {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public goToInput(txId: string, dxNm: number): void {
|
public goToOutpoint(txId: string, txDirection: string, txIndex: number): void {
|
||||||
this.navCtrl.push('input-output', {
|
// output page
|
||||||
'txId': txId,
|
if (txDirection === '>') {
|
||||||
'dir': '<',
|
this.navCtrl.push('outpoint', {
|
||||||
'dxNm': dxNm
|
'txId': txId,
|
||||||
});
|
'txDirection': '>',
|
||||||
}
|
'txIndex': txIndex
|
||||||
|
});
|
||||||
public goToOutput(txId: string, dxNm: number): void {
|
}
|
||||||
this.navCtrl.push('input-output', {
|
// input page
|
||||||
'txId': txId,
|
if (txDirection === '<') {
|
||||||
'dir': '>',
|
this.navCtrl.push('outpoint', {
|
||||||
'dxNm': dxNm
|
'txId': txId,
|
||||||
});
|
'txDirection': '<',
|
||||||
|
'txIndex': txIndex
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public goToAddress(addrStr: string): void {
|
public goToAddress(addrStr: string): void {
|
||||||
|
|||||||
@ -1,3 +0,0 @@
|
|||||||
page-input-output {
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -9,8 +9,11 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="!loading" class="page-content">
|
<div *ngIf="!loading" class="page-content">
|
||||||
<h1 [hidden]=" dxNm !== null && dir !== '>' ">Output Transaction | Index #{{ dxNm }}</h1>
|
<h1>
|
||||||
<h1 [hidden]=" dxNm !== null && dir !== '<' ">Input Transaction | Index #{{ dxNm }}</h1>
|
<span [hidden]=" txIndex !== null && txDirection !== '<' ">Input</span>
|
||||||
|
<span [hidden]=" txIndex !== null && txDirection !== '>' ">Output</span>
|
||||||
|
Transaction | Index #{{ txIndex }}
|
||||||
|
</h1>
|
||||||
<p class="item-hash">
|
<p class="item-hash">
|
||||||
<b>Transaction Hash</b> {{ tx.txid }}
|
<b>Transaction Hash</b> {{ tx.txid }}
|
||||||
</p>
|
</p>
|
||||||
@ -52,7 +55,7 @@
|
|||||||
<br>
|
<br>
|
||||||
<h2>Details</h2>
|
<h2>Details</h2>
|
||||||
|
|
||||||
<transaction [tx]="tx" [dx]="dxNm" [dr]="dir"></transaction>
|
<transaction [tx]="tx" [txIndex]="txIndex" [txDirection]="txDirection"></transaction>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</ion-content>
|
</ion-content>
|
||||||
@ -1,20 +1,20 @@
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { IonicPageModule } from 'ionic-angular';
|
import { IonicPageModule } from 'ionic-angular';
|
||||||
import { InputOutputPage } from './input-output';
|
import { OutpointPage } from './outpoint';
|
||||||
import { TransactionComponentModule } from '../../components/transaction/transaction.module';
|
import { TransactionComponentModule } from '../../components/transaction/transaction.module';
|
||||||
import { HeadNavComponentModule } from '../../components/head-nav/head-nav.module';
|
import { HeadNavComponentModule } from '../../components/head-nav/head-nav.module';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
InputOutputPage
|
OutpointPage
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
IonicPageModule.forChild(InputOutputPage),
|
IonicPageModule.forChild(OutpointPage),
|
||||||
TransactionComponentModule,
|
TransactionComponentModule,
|
||||||
HeadNavComponentModule
|
HeadNavComponentModule
|
||||||
],
|
],
|
||||||
exports: [
|
exports: [
|
||||||
InputOutputPage
|
OutpointPage
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class InputOutputPageModule {}
|
export class OutpointPageModule {}
|
||||||
3
app/src/pages/outpoint/outpoint.scss
Normal file
3
app/src/pages/outpoint/outpoint.scss
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
page-outpoint {
|
||||||
|
|
||||||
|
}
|
||||||
@ -10,25 +10,25 @@ import { ApiProvider } from '../../providers/api/api';
|
|||||||
* on Ionic pages and navigation.
|
* on Ionic pages and navigation.
|
||||||
*/
|
*/
|
||||||
@IonicPage({
|
@IonicPage({
|
||||||
name: 'input-output',
|
name: 'outpoint',
|
||||||
segment: 'tx/:txId/:dir/:dxNm'
|
segment: 'tx/:txId/:txDirection/:txIndex'
|
||||||
})
|
})
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'page-input-output',
|
selector: 'page-outpoint',
|
||||||
templateUrl: 'input-output.html'
|
templateUrl: 'outpoint.html'
|
||||||
})
|
})
|
||||||
export class InputOutputPage {
|
export class OutpointPage {
|
||||||
|
|
||||||
public loading: boolean = true;
|
public loading: boolean = true;
|
||||||
private txId: string;
|
private txId: string;
|
||||||
public dxNm: number;
|
public txIndex: number;
|
||||||
public dir: string;
|
public txDirection: string;
|
||||||
public tx: any = {};
|
public tx: any = {};
|
||||||
|
|
||||||
constructor(public navCtrl: NavController, public navParams: NavParams, private http: Http, private api: ApiProvider) {
|
constructor(public navCtrl: NavController, public navParams: NavParams, private http: Http, private api: ApiProvider) {
|
||||||
this.txId = navParams.get('txId');
|
this.txId = navParams.get('txId');
|
||||||
this.dxNm = Number(navParams.get('dxNm'));
|
this.txIndex = Number(navParams.get('txIndex'));
|
||||||
this.dir = navParams.get('dir');
|
this.txDirection = navParams.get('txDirection');
|
||||||
}
|
}
|
||||||
|
|
||||||
public ionViewDidLoad(): void {
|
public ionViewDidLoad(): void {
|
||||||
Loading…
Reference in New Issue
Block a user