Merge branch 'master' into disable-spinners-in-previews
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
<div class="box preview-box" *ngIf="address && !error">
|
||||
<h2 class="preview-header" i18n="shared.address">Address</h2>
|
||||
<app-preview-title>
|
||||
<span i18n="shared.address">Address</span>
|
||||
</app-preview-title>
|
||||
<div class="row">
|
||||
<div class="col-md">
|
||||
<div class="row d-flex justify-content-between">
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<div class="box preview-box" *ngIf="!error">
|
||||
<h2 class="preview-header" i18n="shared.block-title">Block</h2>
|
||||
<app-preview-title>
|
||||
<span i18n="shared.block-title">Block</span>
|
||||
</app-preview-title>
|
||||
<div class="row">
|
||||
<div class="col-sm">
|
||||
<div class="row d-flex justify-content-between">
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
<span *ngSwitchCase="'signet'" class="network signet"><app-svg-images name="signet" width="35" height="35" viewBox="0 0 65 65" style="width: 40px; height: 48px;" class="mainnet mr-1"></app-svg-images> Signet</span>
|
||||
<span *ngSwitchCase="'testnet'" class="network testnet"><app-svg-images name="testnet" width="35" height="35" viewBox="0 0 65 65" style="width: 40px; height: 48px;" class="mainnet mr-1"></app-svg-images> Testnet</span>
|
||||
<span *ngSwitchCase="'bisq'" class="network bisq"><app-svg-images name="bisq" width="35" height="35" viewBox="0 0 75 75" style="width: 40px; height: 48px;" class="mainnet mr-1"></app-svg-images> Bisq</span>
|
||||
<span *ngSwitchCase="'liquid'" class="network liquid"><app-svg-images name="liquid" width="35" height="35" viewBox="0 0 125 125" style="width: 40px; height: 48px;" class="mainnet mr-1"></app-svg-images> Liquid</span>
|
||||
<span *ngSwitchCase="'liquidtestnet'" class="network liquidtestnet"><app-svg-images name="liquidtestnet" width="35" height="35" viewBox="0 0 125 125" style="width: 40px; height: 48px;" class="mainnet mr-1"></app-svg-images> Liquid Testnet</span>
|
||||
<span *ngSwitchCase="'liquid'" class="network liquid"><app-svg-images name="liquid" width="35" height="35" viewBox="0 0 125 125" style="width: 40px; height: 48px;" class="mainnet mr-1"></app-svg-images> Mainnet</span>
|
||||
<span *ngSwitchCase="'liquidtestnet'" class="network liquidtestnet"><app-svg-images name="liquidtestnet" width="35" height="35" viewBox="0 0 125 125" style="width: 40px; height: 48px;" class="mainnet mr-1"></app-svg-images> Testnet</span>
|
||||
<span *ngSwitchDefault class="network mainnet"><app-svg-images name="bitcoin" width="35" height="35" viewBox="0 0 65 65" style="width: 40px; height: 48px;" class="mainnet mr-1"></app-svg-images> Mainnet</span>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
z-index: 101;
|
||||
line-height: 80px;
|
||||
text-transform: capitalize;
|
||||
font-size: 2.4rem;
|
||||
}
|
||||
|
||||
::ng-deep .title {
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
<h2 class="preview-header">
|
||||
<ng-container *ngIf="{ val: network$ | async } as network">
|
||||
<ng-container [ngSwitch]="network.val">
|
||||
<span *ngSwitchCase="'bisq'">Bisq </span>
|
||||
<span *ngSwitchCase="'liquid'">Liquid </span>
|
||||
<span *ngSwitchCase="'liquidtestnet'">Liquid </span>
|
||||
<span *ngSwitchDefault>Bitcoin </span>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
<ng-content></ng-content>
|
||||
</h2>
|
||||
@@ -0,0 +1,20 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { StateService } from '../../services/state.service';
|
||||
import { Observable, merge, of } from 'rxjs';
|
||||
|
||||
@Component({
|
||||
selector: 'app-preview-title',
|
||||
templateUrl: './preview-title.component.html',
|
||||
styleUrls: [],
|
||||
})
|
||||
export class PreviewTitleComponent implements OnInit {
|
||||
network$: Observable<string>;
|
||||
|
||||
constructor(
|
||||
public stateService: StateService,
|
||||
) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.network$ = merge(of(''), this.stateService.networkChanged$);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
<div class="box preview-box" *ngIf="tx && !error">
|
||||
<h2 class="preview-header" i18n="shared.transaction">Transaction</h2>
|
||||
<app-preview-title>
|
||||
<span i18n="shared.transaction">Transaction</span>
|
||||
</app-preview-title>
|
||||
<div class="row d-flex justify-content-between full-width-row">
|
||||
<div class="title-wrapper">
|
||||
<h1 class="title truncated"><span class="first">{{txId.slice(0,-4)}}</span><span class="last-four">{{txId.slice(-4)}}</span></h1>
|
||||
|
||||
Reference in New Issue
Block a user