diff --git a/frontend/src/app/components/about/about.component.html b/frontend/src/app/components/about/about.component.html index 5220e496e..be3ce4dfd 100644 --- a/frontend/src/app/components/about/about.component.html +++ b/frontend/src/app/components/about/about.component.html @@ -4,8 +4,8 @@ ®
- v{{ packetJsonVersion }} [{{ frontendGitCommitHash }}] - v{{ packetJsonVersion }} [{{ frontendGitCommitHash }}] + v{{ packetJsonVersion }} [{{ frontendGitCommitHash }}] + v{{ packetJsonVersion }} [{{ stateService.env.GIT_COMMIT_HASH_MEMPOOL_SPACE }}]
diff --git a/frontend/src/app/components/menu/menu.component.ts b/frontend/src/app/components/menu/menu.component.ts index 492cc60fe..04184a8b1 100644 --- a/frontend/src/app/components/menu/menu.component.ts +++ b/frontend/src/app/components/menu/menu.component.ts @@ -4,6 +4,7 @@ import { ApiService } from '../../services/api.service'; import { MenuGroup } from '../../interfaces/services.interface'; import { StorageService } from '../../services/storage.service'; import { Router } from '@angular/router'; +import { StateService } from '../../services/state.service'; @Component({ selector: 'app-menu', @@ -17,20 +18,23 @@ export class MenuComponent implements OnInit { navOpen: boolean = false; userMenuGroups$: Observable | undefined; userAuth: any | undefined; - isServices = false; + isServicesPage = false; constructor( private apiService: ApiService, private storageService: StorageService, - private router: Router + private router: Router, + private stateService: StateService ) {} ngOnInit(): void { this.userAuth = this.storageService.getAuth(); - this.userMenuGroups$ = this.apiService.getUserMenuGroups$(); + if (this.stateService.env.GIT_COMMIT_HASH_MEMPOOL_SPACE) { + this.userMenuGroups$ = this.apiService.getUserMenuGroups$(); + } - this.isServices = this.router.url.includes('/services/'); - this.navOpen = this.isServices && !this.isSmallScreen(); + this.isServicesPage = this.router.url.includes('/services/'); + this.navOpen = this.isServicesPage && !this.isSmallScreen(); } isSmallScreen() { @@ -43,7 +47,7 @@ export class MenuComponent implements OnInit { } onLinkClick() { - if (!this.isServices || this.isSmallScreen()) { + if (!this.isServicesPage || this.isSmallScreen()) { this.navOpen = false; } } @@ -54,7 +58,7 @@ export class MenuComponent implements OnInit { @HostListener('window:resize', ['$event']) onResize(event) { - if (this.isServices) { + if (this.isServicesPage) { this.navOpen = !this.isSmallScreen(); } } diff --git a/frontend/src/app/services/api.service.ts b/frontend/src/app/services/api.service.ts index 0037c8675..941ac20aa 100644 --- a/frontend/src/app/services/api.service.ts +++ b/frontend/src/app/services/api.service.ts @@ -37,9 +37,11 @@ export class ApiService { this.apiBasePath = network ? '/' + network : ''; }); - this.getServicesBackendInfo$().subscribe(version => { - this.stateService.servicesBackendInfo$.next(version); - }) + if (this.stateService.env.GIT_COMMIT_HASH_MEMPOOL_SPACE) { + this.getServicesBackendInfo$().subscribe(version => { + this.stateService.servicesBackendInfo$.next(version); + }) + } } list2HStatistics$(): Observable { diff --git a/frontend/src/app/services/state.service.ts b/frontend/src/app/services/state.service.ts index e8a801374..ba0ed371c 100644 --- a/frontend/src/app/services/state.service.ts +++ b/frontend/src/app/services/state.service.ts @@ -49,7 +49,7 @@ export interface Env { SIGNET_BLOCK_AUDIT_START_HEIGHT: number; HISTORICAL_PRICE: boolean; ACCELERATOR: boolean; - SERVICES: boolean; + GIT_COMMIT_HASH_MEMPOOL_SPACE?: string; } const defaultEnv: Env = { @@ -81,7 +81,6 @@ const defaultEnv: Env = { 'SIGNET_BLOCK_AUDIT_START_HEIGHT': 0, 'HISTORICAL_PRICE': true, 'ACCELERATOR': false, - 'SERVICES': false, }; @Injectable({ diff --git a/frontend/src/app/shared/components/global-footer/global-footer.component.html b/frontend/src/app/shared/components/global-footer/global-footer.component.html index 139668579..0890f6fde 100644 --- a/frontend/src/app/shared/components/global-footer/global-footer.component.html +++ b/frontend/src/app/shared/components/global-footer/global-footer.component.html @@ -73,12 +73,12 @@ Matrix -
-
+
+

{{ (backendInfo$ | async)?.hostname }} (v{{ (backendInfo$ | async )?.version }}) [{{ (backendInfo$ | async )?.gitCommit | slice:0:8 }}]

v{{ packetJsonVersion }} [{{ frontendGitCommitHash }}]

-
+

{{ (servicesBackendInfo$ | async)?.hostname }} (v{{ (servicesBackendInfo$ | async )?.version }}) [{{ (servicesBackendInfo$ | async )?.gitCommit | slice:0:8 }}]

diff --git a/frontend/src/app/shared/components/global-footer/global-footer.component.ts b/frontend/src/app/shared/components/global-footer/global-footer.component.ts index 961346ac5..54e1dcbe7 100644 --- a/frontend/src/app/shared/components/global-footer/global-footer.component.ts +++ b/frontend/src/app/shared/components/global-footer/global-footer.component.ts @@ -31,7 +31,7 @@ export class GlobalFooterComponent implements OnInit { username = null; urlSubscription: Subscription; addPadding = false; - isServices = false; + isServicesPage = false; constructor( public stateService: StateService, @@ -46,8 +46,8 @@ export class GlobalFooterComponent implements OnInit { ) {} ngOnInit(): void { - this.isServices = this.router.url.includes('/services/'); - this.addPadding = this.isServices && !this.isSmallScreen(); + this.isServicesPage = this.router.url.includes('/services/'); + this.addPadding = this.isServicesPage && !this.isSmallScreen(); this.env = this.stateService.env; this.backendInfo$ = this.stateService.backendInfo$;