aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/app.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/app.component.ts')
-rw-r--r--client/src/app/app.component.ts10
1 files changed, 8 insertions, 2 deletions
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 @@
1import { Component, OnInit, ViewChild } from '@angular/core' 1import { Component, OnInit, ViewChild, AfterViewInit } from '@angular/core'
2import { DomSanitizer, SafeHtml } from '@angular/platform-browser' 2import { DomSanitizer, SafeHtml } from '@angular/platform-browser'
3import { Event, GuardsCheckStart, NavigationEnd, Router, Scroll } from '@angular/router' 3import { Event, GuardsCheckStart, NavigationEnd, Router, Scroll } from '@angular/router'
4import { AuthService, RedirectService, ServerService, ThemeService } from '@app/core' 4import { AuthService, RedirectService, ServerService, ThemeService } from '@app/core'
@@ -14,6 +14,7 @@ import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
14import { POP_STATE_MODAL_DISMISS } from '@app/shared/misc/constants' 14import { POP_STATE_MODAL_DISMISS } from '@app/shared/misc/constants'
15import { WelcomeModalComponent } from '@app/modal/welcome-modal.component' 15import { WelcomeModalComponent } from '@app/modal/welcome-modal.component'
16import { InstanceConfigWarningModalComponent } from '@app/modal/instance-config-warning-modal.component' 16import { InstanceConfigWarningModalComponent } from '@app/modal/instance-config-warning-modal.component'
17import { CustomModalComponent } from '@app/modal/custom-modal.component'
17import { ServerConfig, UserRole } from '@shared/models' 18import { ServerConfig, UserRole } from '@shared/models'
18import { User } from '@app/shared' 19import { User } from '@app/shared'
19import { InstanceService } from '@app/shared/instance/instance.service' 20import { InstanceService } from '@app/shared/instance/instance.service'
@@ -24,9 +25,10 @@ import { MenuService } from './core/menu/menu.service'
24 templateUrl: './app.component.html', 25 templateUrl: './app.component.html',
25 styleUrls: [ './app.component.scss' ] 26 styleUrls: [ './app.component.scss' ]
26}) 27})
27export class AppComponent implements OnInit { 28export class AppComponent implements OnInit, AfterViewInit {
28 @ViewChild('welcomeModal') welcomeModal: WelcomeModalComponent 29 @ViewChild('welcomeModal') welcomeModal: WelcomeModalComponent
29 @ViewChild('instanceConfigWarningModal') instanceConfigWarningModal: InstanceConfigWarningModalComponent 30 @ViewChild('instanceConfigWarningModal') instanceConfigWarningModal: InstanceConfigWarningModalComponent
31 @ViewChild('customModal') customModal: CustomModalComponent
30 32
31 customCSS: SafeHtml 33 customCSS: SafeHtml
32 34
@@ -87,6 +89,10 @@ export class AppComponent implements OnInit {
87 this.openModalsIfNeeded() 89 this.openModalsIfNeeded()
88 } 90 }
89 91
92 ngAfterViewInit () {
93 this.pluginService.initializeCustomModal(this.customModal)
94 }
95
90 isUserLoggedIn () { 96 isUserLoggedIn () {
91 return this.authService.isLoggedIn() 97 return this.authService.isLoggedIn()
92 } 98 }