Address mouseover QR code

This commit is contained in:
Mononaut 2024-06-10 23:12:41 +00:00
parent 9514bb703b
commit 331b54fe89
No known key found for this signature in database
GPG Key ID: A3F058E41374C04E
3 changed files with 16 additions and 13 deletions

View File

@ -4,6 +4,12 @@
<div class="tx-link">
<app-truncate [text]="addressString" [lastChars]="8" [link]="['/address/' | relativeUrl, addressString]">
<app-clipboard [text]="addressString"></app-clipboard>
<span style="position: relative; cursor: pointer" (mouseover)="showQR = true" (mouseout)="showQR = false" (click)="showQR = !showQR">
<fa-icon [icon]="['fas', 'qrcode']" [fixedWidth]="true"></fa-icon>
<div class="qr-wrapper" [hidden]="!showQR">
<app-qrcode [size]="200" [data]="addressString"></app-qrcode>
</div>
</span>
</app-truncate>
</div>
</div>

View File

@ -1,16 +1,14 @@
.qr-wrapper {
position: absolute;
top: 30px;
right: 0px;
border: solid 10px var(--active-bg);
border-radius: 5px;
background-color: #fff;
padding: 10px;
padding-bottom: 5px;
display: inline-block;
}
.qrcode-col {
margin: 20px auto 10px;
text-align: center;
@media (min-width: 992px){
margin: 0px auto 0px;
}
display: block;
z-index: 99;
}
.fiat {
@ -104,10 +102,6 @@ h1 {
width: 80%;
}
}
.qrcode-col {
flex-grow: 0.5;
}
}
.widget-toggler {

View File

@ -97,6 +97,7 @@ export class AddressComponent implements OnInit, OnDestroy {
network = '';
isMobile: boolean;
showQR: boolean = false;
address: Address;
addressString: string;
@ -141,6 +142,8 @@ export class AddressComponent implements OnInit, OnDestroy {
this.stateService.networkChanged$.subscribe((network) => this.network = network);
this.websocketService.want(['blocks']);
this.onResize();
this.addressLoadingStatus$ = this.route.paramMap
.pipe(
switchMap(() => this.stateService.loadingIndicators$),