You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
RTL/src/app/lnd/on-chain/utxo-tables/utxos/utxos.component.html

81 lines
4.8 KiB
HTML

<div fxLayout="column" fxFlex="100" fxLayoutAlign="start stretch" class="padding-gap-x-large">
<div fxLayout="column" fxLayout.gt-xs="row wrap" fxLayoutAlign.gt-xs="end stretch" fxLayoutAlign="start stretch" class="page-sub-title-container">
<mat-form-field fxFlex="30">
<input matInput (keyup)="applyFilter($event.target)" placeholder="Filter">
</mat-form-field>
</div>
<div fxLayout="row" fxLayoutAlign="start start">
<div [perfectScrollbar] class="table-container" fxFlex="100">
<mat-progress-bar *ngIf="errorLoading===true" mode="indeterminate"></mat-progress-bar>
<table mat-table #table [dataSource]="listUTXOs" matSort
[ngClass]="{'overflow-auto error-border': errorLoading==='error','overflow-auto': true}">
<ng-container matColumnDef="tx_id">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Transaction ID </th>
<td mat-cell *matCellDef="let utxo" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '12rem' : '25rem'}">
<span fxLayout="row">
<span *ngIf="numDustUTXOs > 0 && !isDustUTXO">
<span *ngIf="utxo.amount_sat < 1000; else emptySpace" matTooltip="Risk of dust attack" matTooltipPosition="right">
<mat-icon fxLayoutAlign="start center" color="warn" class="mr-1">warning</mat-icon>
</span>
</span>
<span class="ellipsis-child">{{utxo.outpoint.txid_str}}</span>
</span>
</td>
</ng-container>
<ng-container matColumnDef="output">
<th mat-header-cell *matHeaderCellDef mat-sort-header arrowPosition="before"> Output </th>
<td mat-cell *matCellDef="let utxo">
<span fxLayoutAlign="end center">{{utxo.outpoint.output_index}}</span>
</td>
</ng-container>
<ng-container matColumnDef="label">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Label </th>
<td mat-cell *matCellDef="let utxo" [ngStyle]="{'max-width': (screenSize === screenSizeEnum.XS) ? '12rem' : '25rem'}"> {{utxo?.label}} </td>
</ng-container>
<ng-container matColumnDef="amount_sat">
<th mat-header-cell *matHeaderCellDef mat-sort-header arrowPosition="before"> Amount (Sats) </th>
<td mat-cell *matCellDef="let utxo">
<span fxLayoutAlign="end center">{{(utxo.amount_sat || 0) | number}}</span>
</td>
</ng-container>
<ng-container matColumnDef="confirmations">
<th mat-header-cell *matHeaderCellDef mat-sort-header arrowPosition="before"> Confirmations </th>
<td mat-cell *matCellDef="let utxo"><span fxLayoutAlign="end center">{{(utxo.confirmations || 0) | number}}</span></td>
</ng-container>
<ng-container matColumnDef="actions">
<th mat-header-cell *matHeaderCellDef class="px-3">
<div class="bordered-box table-actions-select">
<mat-select placeholder="Actions" tabindex="1" class="mr-0">
<mat-select-trigger></mat-select-trigger>
<mat-option (click)="onDownloadCSV()">Download CSV</mat-option>
</mat-select>
</div>
</th>
<td mat-cell *matCellDef="let utxo" fxLayoutAlign="end center" class="pl-3">
<div class="bordered-box table-actions-select" fxLayoutAlign="center center">
<mat-select placeholder="Actions" tabindex="2" class="mr-0">
<mat-select-trigger></mat-select-trigger>
<mat-option (click)="onUTXOClick(utxo)">View Info</mat-option>
<mat-option (click)="onLabelUTXO(utxo)">Label</mat-option>
<mat-option (click)="onLeaseUTXO(utxo)">Lease</mat-option>
</mat-select>
</div>
</td>
</ng-container>
<ng-container matColumnDef="no_utxo">
<td mat-footer-cell *matFooterCellDef colspan="4">
<p *ngIf="!listUTXOs?.data || listUTXOs?.data?.length<1">No UTXOs available.</p>
</td>
</ng-container>
<tr mat-footer-row *matFooterRowDef="['no_utxo']" [ngClass]="{'display-none': listUTXOs?.data && listUTXOs?.data?.length>0}"></tr>
<tr mat-header-row *matHeaderRowDef="displayedColumns; sticky: flgSticky;"></tr>
<!-- <tr mat-row *matRowDef="let row; columns: displayedColumns;" [ngClass]="{'alert alert-warn': !isDustUTXO && row.amount_sat < 1000}"></tr> -->
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
</table>
<mat-paginator [pageSize]="pageSize" [pageSizeOptions]="pageSizeOptions" [showFirstLastButtons]="screenSize === screenSizeEnum.XS ? false : true" class="mb-1"></mat-paginator>
</div>
</div>
</div>
<ng-template #emptySpace>
<mat-icon fxLayoutAlign="start center" color="warn" class="mr-1"></mat-icon>
</ng-template>