2018-09-10 03:55:16 +02:00
|
|
|
import { Component, OnInit, OnDestroy } from '@angular/core';
|
2018-03-15 01:48:52 +01:00
|
|
|
import { ElectronService } from 'ngx-electron';
|
2018-09-22 06:22:51 +02:00
|
|
|
import { NavigationService, LeftPanelType } from './services/navigation.service';
|
2018-09-10 03:55:16 +02:00
|
|
|
import { Subscription } from 'rxjs';
|
2018-09-11 07:54:23 +02:00
|
|
|
import { AccountWrapper } from './models/account.models';
|
2018-03-15 01:48:52 +01:00
|
|
|
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'app-root',
|
|
|
|
templateUrl: './app.component.html',
|
2018-09-08 03:02:16 +02:00
|
|
|
styleUrls: ['./app.component.scss']
|
2018-03-15 01:48:52 +01:00
|
|
|
})
|
2018-09-10 03:55:16 +02:00
|
|
|
export class AppComponent implements OnInit, OnDestroy{
|
|
|
|
|
2018-03-15 01:48:52 +01:00
|
|
|
title = 'app';
|
|
|
|
|
2018-09-16 19:21:47 +02:00
|
|
|
floatingColumnActive: boolean;
|
2018-09-10 03:55:16 +02:00
|
|
|
private columnEditorSub: Subscription;
|
2018-03-15 01:48:52 +01:00
|
|
|
|
2018-09-10 03:55:16 +02:00
|
|
|
constructor(private readonly navigationService: NavigationService) {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
ngOnInit(): void {
|
2018-09-22 06:22:51 +02:00
|
|
|
this.columnEditorSub = this.navigationService.activatedPanelSubject.subscribe((type: LeftPanelType) => {
|
|
|
|
if(type === LeftPanelType.Closed) {
|
2018-09-10 03:55:16 +02:00
|
|
|
this.floatingColumnActive = false;
|
2018-09-22 06:22:51 +02:00
|
|
|
} else {
|
|
|
|
this.floatingColumnActive = true;
|
2018-09-10 03:55:16 +02:00
|
|
|
}
|
|
|
|
});
|
2018-03-15 01:48:52 +01:00
|
|
|
}
|
|
|
|
|
2018-09-10 03:55:16 +02:00
|
|
|
ngOnDestroy(): void {
|
|
|
|
this.columnEditorSub.unsubscribe();
|
2018-03-15 01:48:52 +01:00
|
|
|
}
|
2018-09-10 03:55:16 +02:00
|
|
|
|
2018-03-15 01:48:52 +01:00
|
|
|
}
|