mirror of
https://github.com/mempool/mempool.git
synced 2025-09-27 20:47:01 +02:00
fix op_return toggle overflow
This commit is contained in:
@@ -342,7 +342,8 @@
|
|||||||
<button (click)="toggleOrdData(tx.txid, 'vout', vindex)" type="button" class="btn btn-sm badge badge-ord">Runestone</button>
|
<button (click)="toggleOrdData(tx.txid, 'vout', vindex)" type="button" class="btn btn-sm badge badge-ord">Runestone</button>
|
||||||
} @else {
|
} @else {
|
||||||
<a placement="bottom" style="cursor: pointer;">
|
<a placement="bottom" style="cursor: pointer;">
|
||||||
<span *ngIf="vout.scriptpubkey_asm !== 'OP_RETURN'" class="badge badge-secondary scriptmessage" (click)="toggleShowFullOpReturnPreview(vindex)">{{ vout.scriptpubkey_asm | hex2ascii | slice:0:200 }}</span>
|
@if ((vout.scriptpubkey_asm | hex2ascii).length > 200) {
|
||||||
|
<span *ngIf="vout.scriptpubkey_asm !== 'OP_RETURN'" class="badge badge-secondary scriptmessage opreturn-msg" (click)="toggleShowFullOpReturnPreview(vindex)">{{ vout.scriptpubkey_asm | hex2ascii | slice:0:200 }}</span>
|
||||||
<ng-container *ngIf="(showDetails$ | async) === false">
|
<ng-container *ngIf="(showDetails$ | async) === false">
|
||||||
@if ((vout.scriptpubkey_asm | hex2ascii).length > 200) {
|
@if ((vout.scriptpubkey_asm | hex2ascii).length > 200) {
|
||||||
@if (!showFullOpReturnPreview[vindex]) {
|
@if (!showFullOpReturnPreview[vindex]) {
|
||||||
@@ -352,6 +353,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
} @else {
|
||||||
|
<span *ngIf="vout.scriptpubkey_asm !== 'OP_RETURN'" [ngbTooltip]="vout.scriptpubkey_asm | hex2ascii" class="badge badge-secondary scriptmessage">{{ vout.scriptpubkey_asm | hex2ascii }}</span>
|
||||||
|
}
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
@@ -324,3 +324,25 @@ h2 {
|
|||||||
background-color: var(--primary);
|
background-color: var(--primary);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.scriptmessage.opreturn-msg {
|
||||||
|
max-width: 20px;
|
||||||
|
@media (min-width: 476px) {
|
||||||
|
max-width: 110px;
|
||||||
|
}
|
||||||
|
@media (min-width: 576px) {
|
||||||
|
max-width: 190px;
|
||||||
|
}
|
||||||
|
@media (min-width: 768px) {
|
||||||
|
max-width: 330px;
|
||||||
|
}
|
||||||
|
@media (min-width: 850px) {
|
||||||
|
max-width: 452px;
|
||||||
|
}
|
||||||
|
@media (min-width: 992px) {
|
||||||
|
max-width: 120px;
|
||||||
|
}
|
||||||
|
@media (min-width: 1200px) {
|
||||||
|
max-width: 180px;
|
||||||
|
}
|
||||||
|
}
|
@@ -553,9 +553,7 @@ export class TransactionsListComponent implements OnInit, OnChanges, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
toggleShowFullOpReturnPreview(voutIndex: number): void {
|
toggleShowFullOpReturnPreview(voutIndex: number): void {
|
||||||
console.log('toggleShowFullOpReturnPreview', voutIndex);
|
|
||||||
this.showFullOpReturnPreview[voutIndex] = !this.showFullOpReturnPreview[voutIndex];
|
this.showFullOpReturnPreview[voutIndex] = !this.showFullOpReturnPreview[voutIndex];
|
||||||
console.log(this.showFullOpReturnPreview[voutIndex]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
toggleOrdData(txid: string, type: 'vin' | 'vout', index: number) {
|
toggleOrdData(txid: string, type: 'vin' | 'vout', index: number) {
|
||||||
|
Reference in New Issue
Block a user