[menu] only show on official mainnet with accelerator enabled

This commit is contained in:
nymkappa 2023-08-18 18:12:45 +02:00
parent d1c9e8b56e
commit 0c1221dc07
No known key found for this signature in database
GPG Key ID: E155910B16E8BD04
2 changed files with 4 additions and 2 deletions

View File

@ -1,10 +1,10 @@
<app-menu></app-menu>
<app-menu *ngIf="servicesEnabled"></app-menu>
<ng-container *ngIf="{ val: network$ | async } as network">
<header *ngIf="headerVisible" style="position: fixed; width: 100%; z-index: 100;">
<nav class="navbar navbar-expand-md navbar-dark bg-dark">
<!-- Hamburger -->
<div class="profile_image_container" (click)="hamburgerClick()">
<div *ngIf="servicesEnabled" class="profile_image_container" (click)="hamburgerClick()">
<img *ngIf="userAuth" [src]="'/api/v1/services/account/image/' + userAuth.user.username" class="profile_image">
<app-svg-images *ngIf="!userAuth" name="hamburger" height=40></app-svg-images>
</div>

View File

@ -27,6 +27,7 @@ export class MasterPageComponent implements OnInit {
networkPaths$: Observable<Record<string, string>>;
footerVisible = true;
userAuth: any | undefined;
servicesEnabled = false;
@ViewChild(MenuComponent)
private menuComponent!: MenuComponent;
@ -57,6 +58,7 @@ export class MasterPageComponent implements OnInit {
}
});
this.servicesEnabled = this.officialMempoolSpace && this.stateService.env.ACCELERATOR === true && this.stateService.network === '';
this.userAuth = JSON.parse(localStorage.getItem('auth') || '') ?? null;
}