Merge branch 'master' into mononaut/fix-liquid-asset-diagram

This commit is contained in:
wiz
2023-04-03 12:27:32 +09:00
committed by GitHub
29 changed files with 4596 additions and 2258 deletions

View File

@@ -62,6 +62,21 @@
</nav>
</header>
<div *ngIf="network.val === 'testnet' || network.val === 'signet' || network.val === 'liquidtestnet'">
<div class="container p-lg-0 pb-0" style="max-width: 100%; margin-top: 7px" *ngIf="storageService.getValue('hideWarning') !== 'hidden'">
<div class="alert alert-danger mb-0 text-center">
<div class="d-flex justify-content-center align-items-center">
<fa-icon class="between-arrow mr-1" [icon]="['fas', 'exclamation-triangle']" [fixedWidth]="true"></fa-icon>
<span i18n="warning-testnet">This is a test network. Coins have no value</span>
<fa-icon class="between-arrow ml-1" [icon]="['fas', 'exclamation-triangle']" [fixedWidth]="true"></fa-icon>
</div>
<button type="button" class="close" (click)="dismissWarning()">
<span aria-hidden="true">&times;</span>
</button>
</div>
</div>
</div>
<br />
<router-outlet></router-outlet>

View File

@@ -192,4 +192,19 @@ nav {
margin: 33px 0px 0px -19px;
font-size: 7px;
}
}
.close {
position: absolute;
color: black;
right: 10px;
top: 17px;
@media (max-width: 620px) {
right: 10px;
top: 0px;
};
@media (min-width: 992px) {
right: 10px;
top: 13px;
};
}

View File

@@ -4,6 +4,7 @@ import { Observable, merge, of } from 'rxjs';
import { LanguageService } from '../../services/language.service';
import { EnterpriseService } from '../../services/enterprise.service';
import { NavigationService } from '../../services/navigation.service';
import { StorageService } from '../../services/storage.service';
@Component({
selector: 'app-master-page',
@@ -26,6 +27,7 @@ export class MasterPageComponent implements OnInit {
private languageService: LanguageService,
private enterpriseService: EnterpriseService,
private navigationService: NavigationService,
public storageService: StorageService
) { }
ngOnInit() {
@@ -46,4 +48,8 @@ export class MasterPageComponent implements OnInit {
onResize(event: any) {
this.isMobile = window.innerWidth <= 767.98;
}
dismissWarning() {
this.storageService.setValue('hideWarning', 'hidden');
}
}

View File

@@ -8,10 +8,7 @@
</div>
<div *ngIf="network !== 'liquid' && network !== 'liquidtestnet'" class="features">
<app-tx-features [tx]="tx"></app-tx-features>
<span *ngIf="cpfpInfo && (cpfpInfo.bestDescendant || cpfpInfo.descendants.length)" class="badge badge-primary mr-1">
CPFP
</span>
<span *ngIf="cpfpInfo && !cpfpInfo.bestDescendant && !cpfpInfo.descendants.length && cpfpInfo.ancestors.length" class="badge badge-info mr-1">
<span *ngIf="cpfpInfo && (cpfpInfo?.bestDescendant || cpfpInfo?.descendants?.length || cpfpInfo?.ancestors?.length)" class="badge badge-primary ml-1 mr-1">
CPFP
</span>
</div>

View File

@@ -1,3 +1,5 @@
<div infiniteScroll [alwaysCallback]="true" [infiniteScrollDistance]="2" [infiniteScrollUpDistance]="1.5" [infiniteScrollThrottle]="50" (scrolled)="onScroll()">
<ng-container *ngFor="let tx of transactions; let i = index; trackBy: trackByFn">
<div *ngIf="!transactionPage" class="header-bg box tx-page-container">
<a class="tx-link" [routerLink]="['/tx/' | relativeUrl, tx.txid]">
@@ -11,7 +13,7 @@
</div>
</div>
<div class="header-bg box" infiniteScroll [alwaysCallback]="true" [infiniteScrollDistance]="2" [infiniteScrollUpDistance]="1.5" [infiniteScrollThrottle]="50" (scrolled)="onScroll()" [attr.data-cy]="'tx-' + i">
<div class="header-bg box">
<div *ngIf="errorUnblinded" class="error-unblinded">{{ errorUnblinded }}</div>
<div class="row">
@@ -321,6 +323,8 @@
</ng-container>
</div>
<ng-template #assetBox let-item>
{{ item.value / pow(10, assetsMinimal[item.asset][3]) | number: '1.' + assetsMinimal[item.asset][3] + '-' + assetsMinimal[item.asset][3] }} {{ assetsMinimal[item.asset][1] }}
<br />

View File

@@ -182,14 +182,7 @@ export class TransactionsListComponent implements OnInit, OnChanges {
}
onScroll(): void {
const scrollHeight = document.body.scrollHeight;
const scrollTop = document.documentElement.scrollTop;
if (scrollHeight > 0) {
const percentageScrolled = scrollTop * 100 / scrollHeight;
if (percentageScrolled > 50) {
this.loadMore.emit();
}
}
this.loadMore.emit();
}
haveBlindedOutputValues(tx: Transaction): boolean {