mempool/frontend/src/app/components/bisq-master-page/bisq-master-page.component.ts

37 lines
1 KiB
TypeScript
Raw Normal View History

import { Component, OnInit } from '@angular/core';
2021-07-28 22:32:13 +03:00
import { Env, StateService } from '../../services/state.service';
2021-03-21 02:40:37 +07:00
import { Observable } from 'rxjs';
import { LanguageService } from 'src/app/services/language.service';
@Component({
selector: 'app-bisq-master-page',
templateUrl: './bisq-master-page.component.html',
styleUrls: ['./bisq-master-page.component.scss'],
})
export class BisqMasterPageComponent implements OnInit {
connectionState$: Observable<number>;
navCollapsed = false;
2021-07-28 22:32:13 +03:00
env: Env;
isMobile = window.innerWidth <= 767.98;
urlLanguage: string;
constructor(
private stateService: StateService,
private languageService: LanguageService,
) { }
ngOnInit() {
2021-07-28 22:32:13 +03:00
this.env = this.stateService.env;
this.connectionState$ = this.stateService.connectionState$;
this.urlLanguage = this.languageService.getLanguageForUrl();
}
collapse(): void {
this.navCollapsed = !this.navCollapsed;
}
onResize(event: any) {
this.isMobile = window.innerWidth <= 767.98;
}
}