113 lines
		
	
	
		
			5.6 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			113 lines
		
	
	
		
			5.6 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <ng-container *ngFor="let tx of transactions; let i = index; trackBy: trackByFn">
 | |
|   <div *ngIf="!transactionPage" class="header-bg box" style="padding: 10px; margin-bottom: 10px;">
 | |
|     <a [routerLink]="['/tx/', tx.txid]" [state]="{ data: tx }">
 | |
|       <span style="float: left;" class="d-block d-md-none">{{ tx.txid | shortenString : 16 }}</span>
 | |
|       <span style="float: left;" class="d-none d-md-block">{{ tx.txid }}</span>
 | |
|     </a>
 | |
|     <div class="float-right">
 | |
|       <ng-template [ngIf]="tx.status.confirmed">{{ tx.status.block_time * 1000 | date:'yyyy-MM-dd HH:mm' }}</ng-template>
 | |
|       <ng-template [ngIf]="!tx.status.confirmed && tx.firstSeen">
 | |
|         <i><app-time-since [time]="tx.firstSeen" [fastRender]="true"></app-time-since> ago</i>
 | |
|       </ng-template>
 | |
|     </div>
 | |
|   </div>
 | |
|   <div class="header-bg box" infiniteScroll [alwaysCallback]="true" [fromRoot]="true" [infiniteScrollContainer]="'body'" [infiniteScrollDistance]="2" [infiniteScrollUpDistance]="1.5" [infiniteScrollThrottle]="50" (scrolled)="onScroll()">
 | |
|     <div class="row">
 | |
|       <div class="col">
 | |
|         <table class="table table-borderless smaller-text table-xs" style="margin: 0;">
 | |
|           <tbody>
 | |
|             <tr *ngFor="let vin of getFilteredTxVin(tx)">
 | |
|               <td class="arrow-td">
 | |
|                 <ng-template [ngIf]="vin.prevout === null" [ngIfElse]="hasPrevout">
 | |
|                   <i class="arrow grey"></i>
 | |
|                 </ng-template>
 | |
|                 <ng-template #hasPrevout>
 | |
|                   <a [routerLink]="['/tx/', vin.txid]">
 | |
|                     <i class="arrow green"></i>
 | |
|                   </a>
 | |
|                 </ng-template>
 | |
|               </td>
 | |
|               <td>
 | |
|                 <div>
 | |
|                   <ng-template [ngIf]="vin.is_coinbase" [ngIfElse]="regularVin">
 | |
|                     Coinbase (Newly Generated Coins)
 | |
|                   </ng-template>
 | |
|                   <ng-template #regularVin>
 | |
|                     <a [routerLink]="['/address/', vin.prevout.scriptpubkey_address]" title="{{ vin.prevout.scriptpubkey_address }}">
 | |
|                       <span class="d-block d-lg-none">{{ vin.prevout.scriptpubkey_address | shortenString : 16 }}</span>
 | |
|                       <span class="d-none d-lg-block">{{ vin.prevout.scriptpubkey_address | shortenString : 42 }}</span>
 | |
|                     </a>
 | |
|                     <div>
 | |
|                       <app-address-labels [vin]="vin"></app-address-labels>
 | |
|                     </div>
 | |
|                   </ng-template>
 | |
|                 </div>
 | |
|               </td>
 | |
|               <td class="text-right nowrap">
 | |
|                 <app-amount *ngIf="vin.prevout" [satoshis]="vin.prevout.value"></app-amount>
 | |
|               </td>
 | |
|             </tr>
 | |
|             <tr *ngIf="tx.vin.length > tx['@vinLength']">
 | |
|               <td colspan="3" class="text-center">
 | |
|                 <button class="btn btn-sm btn-primary" (click)="loadMoreVin(tx)">Load more</button>
 | |
|               </td>
 | |
|             </tr>
 | |
|           </tbody>
 | |
|         </table>
 | |
| 
 | |
|       </div>
 | |
|       <div class="col mobile-bottomcol">
 | |
|         <table class="table table-borderless smaller-text table-xs"  style="margin: 0;">
 | |
|           <tbody>
 | |
|             <tr *ngFor="let vout of getFilteredTxVout(tx); let vindex = index;">
 | |
|               <td>
 | |
|                 <a *ngIf="vout.scriptpubkey_address; else scriptpubkey_type" [routerLink]="['/address/', vout.scriptpubkey_address]" title="{{ vout.scriptpubkey_address }}">
 | |
|                   <span class="d-block d-lg-none">{{ vout.scriptpubkey_address | shortenString : 16 }}</span>
 | |
|                   <span class="d-none d-lg-block">{{ vout.scriptpubkey_address | shortenString : 42 }}</span>
 | |
|                 </a>
 | |
|                 <ng-template #scriptpubkey_type>
 | |
|                   OP_RETURN
 | |
|                 </ng-template>
 | |
|               </td>
 | |
|               <td class="text-right nowrap">
 | |
|                 <app-amount [satoshis]="vout.value"></app-amount>
 | |
|               </td>
 | |
|               <td class="pl-1 arrow-td">
 | |
|                 <i *ngIf="!outspends[i]; else outspend" class="arrow grey"></i>
 | |
|                 <ng-template #outspend>
 | |
|                   <i *ngIf="!outspends[i][vindex] || !outspends[i][vindex].spent; else spent" class="arrow red"></i>
 | |
|                   <ng-template #spent>
 | |
|                     <a [routerLink]="['/tx/', outspends[i][vindex].txid]"><i class="arrow green"></i></a>
 | |
|                   </ng-template>
 | |
|                 </ng-template>
 | |
|               </td>
 | |
|             </tr>
 | |
|             <tr *ngIf="tx.vout.length > tx['@voutLength']">
 | |
|               <td colspan="3" class="text-center">
 | |
|                 <button class="btn btn-sm btn-primary" (click)="loadMoreVout(tx)">Load more</button>
 | |
|               </td>
 | |
|             </tr>
 | |
|             <tr>
 | |
|               <td class="text-right" colspan="4" style="vertical-align: bottom;">
 | |
|                 <span *ngIf="showConfirmations && latestBlock$ | async as latestBlock">
 | |
|                   <button *ngIf="tx.status.confirmed; else unconfirmedButton" type="button" class="btn btn-sm btn-success mt-3">{{ latestBlock.height - tx.status.block_height + 1 }} confirmation<ng-container *ngIf="latestBlock.height - tx.status.block_height + 1 > 1">s</ng-container></button>
 | |
|                   <ng-template #unconfirmedButton>
 | |
|                     <button type="button" class="btn btn-sm btn-danger mt-3">Unconfirmed</button>
 | |
|                   </ng-template>
 | |
|                    
 | |
|                 </span>
 | |
|                 <button type="button" class="btn btn-sm btn-primary mt-3" (click)="switchCurrency()">
 | |
|                   <app-amount [satoshis]="getTotalTxOutput(tx)"></app-amount>
 | |
|                 </button>
 | |
|               </td>
 | |
|             </tr>
 | |
|           </tbody>
 | |
|         </table>
 | |
|       </div>
 | |
|     </div>
 | |
|   </div>
 | |
| 
 | |
|   <br>
 | |
| 
 | |
| </ng-container>
 |