Fix: duplicated clipboard button

This commit is contained in:
rodribp 2026-02-20 14:02:21 -06:00
parent db5ce43d79
commit 4ebaab8cf4
No known key found for this signature in database
GPG key ID: CC349739DA92EE20
4 changed files with 6 additions and 2 deletions

View file

@ -2,7 +2,7 @@
<div class="title-address">
<h1 i18n="shared.address">Address</h1>
<div class="tx-link">
<app-chunked-address [address]="addressString" [lastChars]="8" [link]="['/address/' | relativeUrl, addressString]">
<app-chunked-address [address]="addressString" [link]="['/address/' | relativeUrl, addressString]">
<span class="qrSpan" (mouseover)="showQR = true" (mouseout)="showQR = false" (pointerdown)="showQR = true">
<fa-icon [icon]="['fas', 'qrcode']" [fixedWidth]="true" [style.font-size]="isMobile ? '18px' : '12px'"></fa-icon>
<div class="qr-wrapper" [hidden]="!showQR">

View file

@ -110,6 +110,7 @@
[address]="vin.prevout.scriptpubkey_address"
[similarity]="similarityMatches.get(tx.txid)?.get(vin.prevout.scriptpubkey_address)"
[link]="['/address/' | relativeUrl, vin.prevout.scriptpubkey_address]"
[showClipboard]="true"
></app-chunked-address>
<ng-template #vinScriptPubkeyType>
{{ vin.prevout.scriptpubkey_type?.toUpperCase() }}
@ -332,6 +333,7 @@
[address]="vout.scriptpubkey_address"
[similarity]="similarityMatches.get(tx.txid)?.get(vout.scriptpubkey_address)"
[link]="['/address/' | relativeUrl, vout.scriptpubkey_address]"
[showClipboard]="true"
></app-chunked-address>
<ng-template #pubkey_type>
<ng-container *ngIf="vout.scriptpubkey_type === 'p2pk'; else scriptpubkey_type">

View file

@ -25,7 +25,8 @@
</ng-container>
<app-clipboard
[text]="address" size="normal"
*ngIf="showClipboard"
[text]="address" size="normal"
class="d-none d-lg-block ml-lg-2">
</app-clipboard>
<ng-content></ng-content>

View file

@ -25,6 +25,7 @@ export class ChunkedAddressComponent implements OnChanges, OnInit, OnDestroy {
@Input() inline: boolean = false;
@Input() textAlign: 'start' | 'end' = 'start';
@Input() disabled: boolean = false;
@Input() showClipboard: boolean = false;
rtl: boolean;
headChunks: AddressChunk[] = [];