From cbe79d705198ab902a776a91c2d8a44a8e7a8eba Mon Sep 17 00:00:00 2001 From: softsimon Date: Tue, 13 Apr 2021 11:51:55 +0400 Subject: [PATCH] Show backend info at the bottom. Removing frontend hostname. Re-adding frontend version and commit on top. JS error fix. --- .../src/app/components/about/about.component.html | 14 ++++++++------ .../src/app/components/about/about.component.ts | 4 ++-- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/frontend/src/app/components/about/about.component.html b/frontend/src/app/components/about/about.component.html index b0e5d94b0..c76f5df73 100644 --- a/frontend/src/app/components/about/about.component.html +++ b/frontend/src/app/components/about/about.component.html @@ -3,13 +3,9 @@

-
-
- Frontend: - v{{ packetJsonVersion }} ({{ frontendGitCommitHash }}) [{{ hostname }}] -
- Backend: v{{ (backendInfo$ | async ).version }} ({{ (backendInfo$ | async ).gitCommit | slice:0:8 }}) [{{ (backendInfo$ | async).hostname }}] +
+ v{{ packetJsonVersion }} [{{ frontendGitCommitHash }}]

@@ -396,4 +392,10 @@ Terms of Service
+
+ +
+ {{ (backendInfo$ | async)?.hostname }} (v{{ (backendInfo$ | async )?.version }}) [{{ (backendInfo$ | async )?.gitCommit | slice:0:8 }}] +
+ diff --git a/frontend/src/app/components/about/about.component.ts b/frontend/src/app/components/about/about.component.ts index 9e7b79715..158a00d47 100644 --- a/frontend/src/app/components/about/about.component.ts +++ b/frontend/src/app/components/about/about.component.ts @@ -6,7 +6,7 @@ import { Observable, Subscription } from 'rxjs'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { ApiService } from 'src/app/services/api.service'; import { DomSanitizer, SafeUrl } from '@angular/platform-browser'; -import { delay, map, retryWhen, switchMap, tap } from 'rxjs/operators'; +import { delay, retryWhen, switchMap, tap } from 'rxjs/operators'; import { IBackendInfo } from 'src/app/interfaces/websocket.interface'; @Component({ @@ -25,7 +25,7 @@ export class AboutComponent implements OnInit, OnDestroy { sponsorsEnabled = this.stateService.env.OFFICIAL_MEMPOOL_SPACE; frontendGitCommitHash = this.stateService.env.GIT_COMMIT_HASH.substr(0, 8); packetJsonVersion = this.stateService.env.PACKAGE_JSON_VERSION; - hostname = document.location.hostname; + officialMempoolSpace = this.stateService.env.OFFICIAL_MEMPOOL_SPACE; sponsors = null; contributors = null; requestSubscription: Subscription | undefined;