X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fapp.component.ts;h=12c0efd8a5f9efa09d1dfe6ec5a6ae7d1a8195a4;hb=25a42e293be90d35afad2096e9db2fa3d617d855;hp=1d077646cae4f76ceae5d90d480f407882e83f54;hpb=9b3078581f2767c7aa2ed5766e1a588ebc0cb875;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/app.component.ts b/client/src/app/app.component.ts index 1d077646c..12c0efd8a 100644 --- a/client/src/app/app.component.ts +++ b/client/src/app/app.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, ViewChild } from '@angular/core' +import { Component, OnInit, ViewChild, AfterViewInit } from '@angular/core' import { DomSanitizer, SafeHtml } from '@angular/platform-browser' import { Event, GuardsCheckStart, NavigationEnd, Router, Scroll } from '@angular/router' import { AuthService, RedirectService, ServerService, ThemeService } from '@app/core' @@ -14,6 +14,7 @@ import { NgbModal } from '@ng-bootstrap/ng-bootstrap' import { POP_STATE_MODAL_DISMISS } from '@app/shared/misc/constants' import { WelcomeModalComponent } from '@app/modal/welcome-modal.component' import { InstanceConfigWarningModalComponent } from '@app/modal/instance-config-warning-modal.component' +import { CustomModalComponent } from '@app/modal/custom-modal.component' import { ServerConfig, UserRole } from '@shared/models' import { User } from '@app/shared' import { InstanceService } from '@app/shared/instance/instance.service' @@ -24,9 +25,10 @@ import { MenuService } from './core/menu/menu.service' templateUrl: './app.component.html', styleUrls: [ './app.component.scss' ] }) -export class AppComponent implements OnInit { +export class AppComponent implements OnInit, AfterViewInit { @ViewChild('welcomeModal') welcomeModal: WelcomeModalComponent @ViewChild('instanceConfigWarningModal') instanceConfigWarningModal: InstanceConfigWarningModalComponent + @ViewChild('customModal') customModal: CustomModalComponent customCSS: SafeHtml @@ -87,6 +89,10 @@ export class AppComponent implements OnInit { this.openModalsIfNeeded() } + ngAfterViewInit () { + this.pluginService.initializeCustomModal(this.customModal) + } + isUserLoggedIn () { return this.authService.isLoggedIn() }