Fixes for Liquid

This commit is contained in:
softsimon 2023-05-11 17:14:16 -05:00
parent b81dd99825
commit f5d311ca44
No known key found for this signature in database
GPG Key ID: 488D7DCFB5A430D7
4 changed files with 19 additions and 9 deletions

View File

@ -44,7 +44,7 @@
</ng-container> </ng-container>
</a> </a>
<div ngbDropdown (window:resize)="onResize($event)" class="dropdown-container" *ngIf="env.TESTNET_ENABLED || env.SIGNET_ENABLED || env.LIQUID_ENABLED || env.BISQ_ENABLED || env.LIQUID_TESTNET_ENABLED"> <div ngbDropdown (window:resize)="onResize()" class="dropdown-container" *ngIf="env.TESTNET_ENABLED || env.SIGNET_ENABLED || env.LIQUID_ENABLED || env.BISQ_ENABLED || env.LIQUID_TESTNET_ENABLED">
<button ngbDropdownToggle type="button" class="btn btn-secondary dropdown-toggle-split" aria-haspopup="true"> <button ngbDropdownToggle type="button" class="btn btn-secondary dropdown-toggle-split" aria-haspopup="true">
<app-svg-images [name]="network.val === '' ? 'liquid' : network.val" width="22" height="22" viewBox="0 0 125 125" style="width: 30px; height: 30px; margin-right: 5px;"></app-svg-images> <app-svg-images [name]="network.val === '' ? 'liquid' : network.val" width="22" height="22" viewBox="0 0 125 125" style="width: 30px; height: 30px; margin-right: 5px;"></app-svg-images>
</button> </button>
@ -92,10 +92,10 @@
<app-testnet-alert *ngIf="network.val === 'liquidtestnet'"></app-testnet-alert> <app-testnet-alert *ngIf="network.val === 'liquidtestnet'"></app-testnet-alert>
<br /> <main>
<router-outlet></router-outlet> <router-outlet></router-outlet>
</main>
<app-global-footer></app-global-footer> <app-global-footer *ngIf="footerVisible"></app-global-footer>
</ng-container> </ng-container>

View File

@ -19,6 +19,7 @@ export class LiquidMasterPageComponent implements OnInit {
network$: Observable<string>; network$: Observable<string>;
urlLanguage: string; urlLanguage: string;
networkPaths: { [network: string]: string }; networkPaths: { [network: string]: string };
footerVisible = true;
constructor( constructor(
private stateService: StateService, private stateService: StateService,
@ -27,13 +28,18 @@ export class LiquidMasterPageComponent implements OnInit {
private navigationService: NavigationService, private navigationService: NavigationService,
) { } ) { }
ngOnInit() { ngOnInit(): void {
this.env = this.stateService.env; this.env = this.stateService.env;
this.connectionState$ = this.stateService.connectionState$; this.connectionState$ = this.stateService.connectionState$;
this.network$ = merge(of(''), this.stateService.networkChanged$); this.network$ = merge(of(''), this.stateService.networkChanged$);
this.urlLanguage = this.languageService.getLanguageForUrl(); this.urlLanguage = this.languageService.getLanguageForUrl();
this.navigationService.subnetPaths.subscribe((paths) => { this.navigationService.subnetPaths.subscribe((paths) => {
this.networkPaths = paths; this.networkPaths = paths;
if (paths.liquid.indexOf('docs') > -1) {
this.footerVisible = false;
} else {
this.footerVisible = true;
}
}); });
} }
@ -41,7 +47,7 @@ export class LiquidMasterPageComponent implements OnInit {
this.navCollapsed = !this.navCollapsed; this.navCollapsed = !this.navCollapsed;
} }
onResize(event: any) { onResize(): void {
this.isMobile = window.innerWidth <= 767.98; this.isMobile = window.innerWidth <= 767.98;
} }
} }

View File

@ -64,7 +64,7 @@
<app-testnet-alert *ngIf="network.val === 'testnet' || network.val === 'signet'"></app-testnet-alert> <app-testnet-alert *ngIf="network.val === 'testnet' || network.val === 'signet'"></app-testnet-alert>
<main style="margin-top: 24px;"> <main>
<router-outlet></router-outlet> <router-outlet></router-outlet>
</main> </main>

View File

@ -62,6 +62,10 @@ body {
position: relative; position: relative;
} }
main {
margin-top: 24px;
}
.full-height { .full-height {
@media (max-width: 767.98px) { @media (max-width: 767.98px) {
min-height: 100vh; min-height: 100vh;