2018-04-11 16:48:48 +02:00
|
|
|
import {
|
|
|
|
Component,
|
|
|
|
Input,
|
2018-04-11 17:18:58 +02:00
|
|
|
OnInit,
|
2018-04-11 16:48:48 +02:00
|
|
|
} from '@angular/core';
|
2018-04-05 21:35:56 +02:00
|
|
|
|
2021-06-07 19:25:37 +02:00
|
|
|
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
|
2018-04-05 21:35:56 +02:00
|
|
|
|
|
|
|
import { PopupUtilsService } from '../services/popup-utils.service';
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'app-pop-out',
|
2018-04-06 17:48:45 +02:00
|
|
|
templateUrl: 'pop-out.component.html',
|
2018-04-05 21:35:56 +02:00
|
|
|
})
|
2018-04-11 17:18:58 +02:00
|
|
|
export class PopOutComponent implements OnInit {
|
2018-04-11 16:48:48 +02:00
|
|
|
@Input() show = true;
|
|
|
|
|
2021-04-14 23:43:09 +02:00
|
|
|
constructor(private platformUtilsService: PlatformUtilsService,
|
2018-04-14 05:37:57 +02:00
|
|
|
private popupUtilsService: PopupUtilsService) { }
|
2018-04-11 17:18:58 +02:00
|
|
|
|
|
|
|
ngOnInit() {
|
|
|
|
if (this.show) {
|
2021-02-03 20:36:05 +01:00
|
|
|
if (this.popupUtilsService.inSidebar(window) && this.platformUtilsService.isFirefox()) {
|
2018-04-14 05:37:57 +02:00
|
|
|
this.show = false;
|
|
|
|
}
|
2018-04-11 17:18:58 +02:00
|
|
|
}
|
2018-04-11 16:48:48 +02:00
|
|
|
}
|
2018-04-05 21:35:56 +02:00
|
|
|
|
|
|
|
expand() {
|
2018-12-03 17:23:14 +01:00
|
|
|
this.popupUtilsService.popOut(window);
|
2018-04-05 21:35:56 +02:00
|
|
|
}
|
|
|
|
}
|