Renamed the electrs backend support to 'electrs'.

This commit is contained in:
Simon Lindh
2019-12-06 22:37:07 +01:00
parent 90d72175bd
commit 3ddbd33b70
18 changed files with 40 additions and 40 deletions

View File

@@ -49,11 +49,11 @@
"vendorChunk": false,
"buildOptimizer": true
},
"esplora": {
"electrs": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment-esplora.prod.ts"
"with": "src/environments/environment-electrs.prod.ts"
}
],
"optimization": true,

View File

@@ -6,7 +6,7 @@
"ng": "ng",
"start": "ng serve --aot --proxy-config proxy.conf.json",
"build": "ng build --prod",
"build-esplora": "ng build --prod --configuration=esplora",
"build-electrs": "ng build --prod --configuration=electrs",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"

View File

@@ -1,7 +1,7 @@
<div class="modal-header">
<h4 class="modal-title">Fee distribution for block
<a *ngIf="!isEsploraEnabled" href="https://www.blockstream.info/block-height/{{ block.height }}" target="_blank">#{{ block.height }}</a>
<a *ngIf="isEsploraEnabled" (click)="activeModal.dismiss()" [routerLink]="['/explorer/block/', block.hash]">#{{ block.height }}</a>
<a *ngIf="!isElectrsEnabled" href="https://www.blockstream.info/block-height/{{ block.height }}" target="_blank">#{{ block.height }}</a>
<a *ngIf="isElectrsEnabled" (click)="activeModal.dismiss()" [routerLink]="['/explorer/block/', block.hash]">#{{ block.height }}</a>
</h4>
<button type="button" class="close" aria-label="Close" (click)="activeModal.dismiss('Cross click')">
<span aria-hidden="true">&times;</span>

View File

@@ -12,7 +12,7 @@ import { environment } from '../../../environments/environment';
export class BlockModalComponent implements OnInit {
@Input() block: IBlock;
blockSubsidy = 50;
isEsploraEnabled = !!environment.esplora;
isElectrsEnabled = !!environment.electrs;
conversions: any;
constructor(

View File

@@ -2,8 +2,8 @@
<div *ngFor="let block of blocks; let i = index; trackBy: trackByBlocksFn" >
<div (click)="openBlockModal(block);" class="text-center bitcoin-block mined-block" id="bitcoin-block-{{ block.height }}" [ngStyle]="getStyleForBlock(block)">
<div class="block-height">
<a *ngIf="!isEsploraEnabled" href="https://www.blockstream.info/block-height/{{ block.height }}" target="_blank">#{{ block.height }}</a>
<a *ngIf="isEsploraEnabled" [routerLink]="['/explorer/block/', block.hash]">#{{ block.height }}</a>
<a *ngIf="!isElectrsEnabled" href="https://www.blockstream.info/block-height/{{ block.height }}" target="_blank">#{{ block.height }}</a>
<a *ngIf="isElectrsEnabled" [routerLink]="['/explorer/block/', block.hash]">#{{ block.height }}</a>
</div>
<div class="block-body">
<div class="fees">

View File

@@ -16,7 +16,7 @@ export class BlockchainBlocksComponent implements OnInit, OnDestroy {
blocksSubscription: Subscription;
interval: any;
trigger = 0;
isEsploraEnabled = !!environment.esplora;
isElectrsEnabled = !!environment.electrs;
constructor(
private modalService: NgbModal,

View File

@@ -18,7 +18,7 @@
<li class="nav-item" routerLinkActive="active">
<a class="nav-link" routerLink="/tv" (click)="collapse()">TV view &nbsp;<img src="./assets/expand.png" width="15"/></a>
</li>
<li class="nav-item" routerLinkActive="active" *ngIf="isEsploraEnabled">
<li class="nav-item" routerLinkActive="active" *ngIf="isElectrsEnabled">
<a class="nav-link" routerLink="/explorer" (click)="collapse()">Explorer</a>
</li>
<li class="nav-item" routerLinkActive="active">

View File

@@ -13,7 +13,7 @@ export class MasterPageComponent implements OnInit {
navCollapsed = false;
isOffline = false;
searchForm: FormGroup;
isEsploraEnabled = !!environment.esplora;
isElectrsEnabled = !!environment.electrs;
currentBaseRoot = '';
regexAddr = /^([a-km-zA-HJ-NP-Z1-9]{26,35}|[a-km-zA-HJ-NP-Z1-9]{80}|[a-z]{2,5}1[ac-hj-np-z02-9]{8,87})$/;

View File

@@ -4,8 +4,8 @@
<tr>
<td class="text-left"><b>Transaction hash</b></td>
<td class="text-right">
<a *ngIf="!isEsploraEnabled" href="https://www.blockstream.info/tx/{{ tx?.txid }}" target="_blank">{{ tx?.txid | shortenString }}</a>
<a *ngIf="isEsploraEnabled" [routerLink]="['/explorer/tx/', tx?.txid]">{{ tx?.txid | shortenString }}</a>
<a *ngIf="!isElectrsEnabled" href="https://www.blockstream.info/tx/{{ tx?.txid }}" target="_blank">{{ tx?.txid | shortenString }}</a>
<a *ngIf="isElectrsEnabled" [routerLink]="['/explorer/tx/', tx?.txid]">{{ tx?.txid | shortenString }}</a>
</td>
</tr>
<tr>

View File

@@ -36,7 +36,7 @@ export class TxBubbleComponent implements OnInit, OnDestroy {
txTrackingTx: ITransaction | null = null;
txShowTxNotFound = false;
isEsploraEnabled = !!environment.esplora;
isElectrsEnabled = !!environment.electrs;
@HostListener('window:resize', ['$event'])
onResize(event: Event) {

View File

@@ -1,4 +1,4 @@
export const environment = {
production: true,
esplora: true,
electrs: true,
};

View File

@@ -1,4 +1,4 @@
export const environment = {
production: true,
esplora: false,
electrs: false,
};

View File

@@ -4,7 +4,7 @@
export const environment = {
production: false,
esplora: true,
electrs: true,
};
/*