diff options
Diffstat (limited to 'client/src/app/app.component.ts')
-rw-r--r-- | client/src/app/app.component.ts | 10 |
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 @@ | |||
1 | import { Component, OnInit, ViewChild } from '@angular/core' | 1 | import { Component, OnInit, ViewChild, AfterViewInit } from '@angular/core' |
2 | import { DomSanitizer, SafeHtml } from '@angular/platform-browser' | 2 | import { DomSanitizer, SafeHtml } from '@angular/platform-browser' |
3 | import { Event, GuardsCheckStart, NavigationEnd, Router, Scroll } from '@angular/router' | 3 | import { Event, GuardsCheckStart, NavigationEnd, Router, Scroll } from '@angular/router' |
4 | import { AuthService, RedirectService, ServerService, ThemeService } from '@app/core' | 4 | import { AuthService, RedirectService, ServerService, ThemeService } from '@app/core' |
@@ -14,6 +14,7 @@ import { NgbModal } from '@ng-bootstrap/ng-bootstrap' | |||
14 | import { POP_STATE_MODAL_DISMISS } from '@app/shared/misc/constants' | 14 | import { POP_STATE_MODAL_DISMISS } from '@app/shared/misc/constants' |
15 | import { WelcomeModalComponent } from '@app/modal/welcome-modal.component' | 15 | import { WelcomeModalComponent } from '@app/modal/welcome-modal.component' |
16 | import { InstanceConfigWarningModalComponent } from '@app/modal/instance-config-warning-modal.component' | 16 | import { InstanceConfigWarningModalComponent } from '@app/modal/instance-config-warning-modal.component' |
17 | import { CustomModalComponent } from '@app/modal/custom-modal.component' | ||
17 | import { ServerConfig, UserRole } from '@shared/models' | 18 | import { ServerConfig, UserRole } from '@shared/models' |
18 | import { User } from '@app/shared' | 19 | import { User } from '@app/shared' |
19 | import { InstanceService } from '@app/shared/instance/instance.service' | 20 | import { 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 | }) |
27 | export class AppComponent implements OnInit { | 28 | export 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 | } |