diff options
Diffstat (limited to 'client/src/app/modal')
-rw-r--r-- | client/src/app/modal/account-setup-modal.component.ts | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/client/src/app/modal/account-setup-modal.component.ts b/client/src/app/modal/account-setup-modal.component.ts index e5d36e006..8256f5103 100644 --- a/client/src/app/modal/account-setup-modal.component.ts +++ b/client/src/app/modal/account-setup-modal.component.ts | |||
@@ -1,5 +1,5 @@ | |||
1 | import { Component, ElementRef, OnInit, ViewChild } from '@angular/core' | 1 | import { Component, ElementRef, OnInit, ViewChild } from '@angular/core' |
2 | import { AuthService, ServerService, User } from '@app/core' | 2 | import { AuthService, ServerService, User, UserService } from '@app/core' |
3 | import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap' | 3 | import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap' |
4 | import { HTMLServerConfig } from '@shared/models' | 4 | import { HTMLServerConfig } from '@shared/models' |
5 | 5 | ||
@@ -17,6 +17,7 @@ export class AccountSetupModalComponent implements OnInit { | |||
17 | private serverConfig: HTMLServerConfig | 17 | private serverConfig: HTMLServerConfig |
18 | 18 | ||
19 | constructor ( | 19 | constructor ( |
20 | private userService: UserService, | ||
20 | private authService: AuthService, | 21 | private authService: AuthService, |
21 | private modalService: NgbModal, | 22 | private modalService: NgbModal, |
22 | private serverService: ServerService | 23 | private serverService: ServerService |
@@ -49,8 +50,9 @@ export class AccountSetupModalComponent implements OnInit { | |||
49 | this.authService.userInformationLoaded | 50 | this.authService.userInformationLoaded |
50 | .subscribe( | 51 | .subscribe( |
51 | () => { | 52 | () => { |
52 | if (this.isUserRoot) return false | 53 | if (this.isUserRoot) return |
53 | if (this.hasAccountAvatar && this.hasAccountDescription) return false | 54 | if (this.hasAccountAvatar && this.hasAccountDescription) return |
55 | if (this.userService.hasSignupInThisSession()) return | ||
54 | 56 | ||
55 | this.show() | 57 | this.show() |
56 | } | 58 | } |
@@ -58,7 +60,7 @@ export class AccountSetupModalComponent implements OnInit { | |||
58 | } | 60 | } |
59 | 61 | ||
60 | show () { | 62 | show () { |
61 | if (this.ref) return false | 63 | if (this.ref) return |
62 | 64 | ||
63 | this.ref = this.modalService.open(this.modal, { | 65 | this.ref = this.modalService.open(this.modal, { |
64 | centered: true, | 66 | centered: true, |