ellipsis for long op_return messages in tx preview

This commit is contained in:
Mononaut committed 2022-11-22 16:32:09 +09:00
1 parent 0107f5d2c5
commit 0e277cdb4e
2 files changed
+33 -26

No files matched your search

@@ -41,24 +41,20 @@
</div>
<div class="overlaid">
<ng-container [ngSwitch]="extraData">
<table class="opreturns" *ngSwitchCase="'coinbase'">
<tbody>
<tr>
<td class="label">Coinbase</td>
<td class="message">{{ tx.vin[0].scriptsig | hex2ascii }}</td>
</tr>
</tbody>
</table>
<table class="opreturns" *ngSwitchCase="'opreturn'">
<tbody>
<div class="opreturns" *ngSwitchCase="'coinbase'">
<div class="opreturn-row">
<span class="label">Coinbase</span>
<span class="message">{{ tx.vin[0].scriptsig | hex2ascii }}</span>
</div>
</div>
<div class="opreturns" *ngSwitchCase="'opreturn'">
<ng-container *ngFor="let vout of opReturns.slice(0,3)">
<tr>
<td class="label">OP_RETURN</td>
<td *ngIf="vout.scriptpubkey_asm !== 'OP_RETURN'" class="message">{{ vout.scriptpubkey_asm | hex2ascii }}</td>
</tr>
<div class="opreturn-row">
<span class="label">OP_RETURN</span>
<span *ngIf="vout.scriptpubkey_asm !== 'OP_RETURN'" class="message">{{ vout.scriptpubkey_asm | hex2ascii }}</span>
</div>
</ng-container>
</tbody>
</table>
</div>
</ng-container>
</div>
</div>