Load 1000 more inputs/outputs per click. Fix label i18n.

This commit is contained in:
Mononaut 2022-11-22 14:47:31 +09:00
parent 330ab9682b
commit d107286344
No known key found for this signature in database
GPG Key ID: A3F058E41374C04E
2 changed files with 15 additions and 3 deletions

View File

@ -148,7 +148,13 @@
</ng-template>
<tr *ngIf="tx.vin.length > getVinLimit(tx)">
<td colspan="3" class="text-center">
<button class="btn btn-sm btn-primary mt-2" (click)="showMoreInputs(tx)"><span i18n="show-more">Show more</span> ({{ getVinLimit(tx, true) }} / {{ tx.vin.length }})</button>
<button class="btn btn-sm btn-primary mt-2" (click)="showMoreInputs(tx)">
<span *ngIf="getVinLimit(tx, true) >= tx.vin.length; else showMoreInputsLabel" i18n="show-all">Show all</span>
<ng-template #showMoreInputsLabel>
<span i18n="show-more">Show more</span>
</ng-template>
({{ tx.vin.length - getVinLimit(tx) }} <span i18n="inputs-remaining">remaining</span> )
</button>
</td>
</tr>
</tbody>
@ -259,7 +265,13 @@
</ng-template>
<tr *ngIf="tx.vout.length > getVoutLimit(tx)">
<td colspan="3" class="text-center">
<button class="btn btn-sm btn-primary mt-2" (click)="showMoreOutputs(tx)"><span i18n="show-more">Show more</span> ({{ getVoutLimit(tx, true) }} / {{ tx.vout.length }})</button>
<button class="btn btn-sm btn-primary mt-2" (click)="showMoreOutputs(tx)">
<span *ngIf="getVoutLimit(tx, true) >= tx.vout.length; else showMoreOutputsLabel" i18n="show-all">Show all</span>
<ng-template #showMoreOutputsLabel>
<span i18n="show-more">Show more</span>
</ng-template>
({{ tx.vout.length - getVoutLimit(tx) }} <span i18n="outputs-remaining">remaining</span> )
</button>
</td>
</tr>
</tbody>

View File

@ -18,7 +18,7 @@ import { ApiService } from '../../services/api.service';
export class TransactionsListComponent implements OnInit, OnChanges {
network = '';
nativeAssetId = this.stateService.network === 'liquidtestnet' ? environment.nativeTestAssetId : environment.nativeAssetId;
showMoreIncrement = 40;
showMoreIncrement = 1000;
@Input() transactions: Transaction[];
@Input() showConfirmations = false;