2020-02-16 16:15:07 +01:00
|
|
|
import { Component, OnInit } from '@angular/core';
|
|
|
|
import { StateService } from '../../services/state.service';
|
2020-05-02 12:52:26 +02:00
|
|
|
import { environment } from 'src/environments/environment';
|
2020-02-16 16:15:07 +01:00
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'app-master-page',
|
|
|
|
templateUrl: './master-page.component.html',
|
|
|
|
styleUrls: ['./master-page.component.scss']
|
|
|
|
})
|
|
|
|
export class MasterPageComponent implements OnInit {
|
2020-05-02 12:52:26 +02:00
|
|
|
network = environment.network;
|
|
|
|
|
2020-02-16 16:15:07 +01:00
|
|
|
navCollapsed = false;
|
2020-03-09 11:53:54 +01:00
|
|
|
connectionState = 2;
|
2020-02-16 16:15:07 +01:00
|
|
|
|
|
|
|
constructor(
|
|
|
|
private stateService: StateService,
|
|
|
|
) { }
|
|
|
|
|
|
|
|
ngOnInit() {
|
2020-03-09 11:53:54 +01:00
|
|
|
this.stateService.connectionState$
|
2020-02-16 16:15:07 +01:00
|
|
|
.subscribe((state) => {
|
2020-03-09 11:53:54 +01:00
|
|
|
this.connectionState = state;
|
2020-02-16 16:15:07 +01:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
collapse(): void {
|
|
|
|
this.navCollapsed = !this.navCollapsed;
|
|
|
|
}
|
|
|
|
}
|