2018-09-10 03:55:16 +02:00
|
|
|
import { Component, OnInit } from '@angular/core';
|
|
|
|
import { NavigationService } from '../../services/navigation.service';
|
2018-09-11 07:54:23 +02:00
|
|
|
import { AccountWrapper } from '../../models/account.models';
|
2018-09-10 03:55:16 +02:00
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'app-floating-column',
|
|
|
|
templateUrl: './floating-column.component.html',
|
|
|
|
styleUrls: ['./floating-column.component.scss']
|
|
|
|
})
|
|
|
|
export class FloatingColumnComponent implements OnInit {
|
2018-09-11 07:54:23 +02:00
|
|
|
userAccountUsed: AccountWrapper;
|
2018-09-10 03:55:16 +02:00
|
|
|
columnEditorIsOpen: boolean;
|
|
|
|
messageEditorIsOpen: boolean;
|
|
|
|
|
|
|
|
constructor(private readonly navigationService: NavigationService) { }
|
|
|
|
|
|
|
|
ngOnInit() {
|
2018-09-11 07:54:23 +02:00
|
|
|
this.navigationService.openColumnEditorSubject.subscribe((acc: AccountWrapper) => {
|
|
|
|
this.userAccountUsed = acc;
|
|
|
|
if(this.userAccountUsed) {
|
2018-09-10 03:55:16 +02:00
|
|
|
this.columnEditorIsOpen = true;
|
|
|
|
} else {
|
|
|
|
this.columnEditorIsOpen = false;
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
closePanel(): boolean {
|
|
|
|
this.navigationService.closeColumnEditor();
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|