mirror of
https://github.com/mempool/mempool.git
synced 2025-01-10 15:30:05 +01:00
28 lines
612 B
TypeScript
28 lines
612 B
TypeScript
|
import { Component, OnInit } from '@angular/core';
|
||
|
import { StateService } from '../../services/state.service';
|
||
|
|
||
|
@Component({
|
||
|
selector: 'app-master-page',
|
||
|
templateUrl: './master-page.component.html',
|
||
|
styleUrls: ['./master-page.component.scss']
|
||
|
})
|
||
|
export class MasterPageComponent implements OnInit {
|
||
|
navCollapsed = false;
|
||
|
isOffline = false;
|
||
|
|
||
|
constructor(
|
||
|
private stateService: StateService,
|
||
|
) { }
|
||
|
|
||
|
ngOnInit() {
|
||
|
this.stateService.isOffline$
|
||
|
.subscribe((state) => {
|
||
|
this.isOffline = state;
|
||
|
});
|
||
|
}
|
||
|
|
||
|
collapse(): void {
|
||
|
this.navCollapsed = !this.navCollapsed;
|
||
|
}
|
||
|
}
|