aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/modal
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-08-27 09:26:45 +0200
committerChocobozzz <me@florianbigard.com>2021-08-27 09:26:45 +0200
commitbf80903fde923e0c84226ac442a2a382db74aee4 (patch)
treeeec79c6dc03c131695aa73a7b3eed3a8cb6bbc6c /client/src/app/modal
parente111a5a3a11a5b251b8989cd406c2dbba9254e28 (diff)
downloadPeerTube-bf80903fde923e0c84226ac442a2a382db74aee4.tar.gz
PeerTube-bf80903fde923e0c84226ac442a2a382db74aee4.tar.zst
PeerTube-bf80903fde923e0c84226ac442a2a382db74aee4.zip
Don't display account setup modal on signup
Don't bother user with a modal just after signup
Diffstat (limited to 'client/src/app/modal')
-rw-r--r--client/src/app/modal/account-setup-modal.component.ts10
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 @@
1import { Component, ElementRef, OnInit, ViewChild } from '@angular/core' 1import { Component, ElementRef, OnInit, ViewChild } from '@angular/core'
2import { AuthService, ServerService, User } from '@app/core' 2import { AuthService, ServerService, User, UserService } from '@app/core'
3import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap' 3import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap'
4import { HTMLServerConfig } from '@shared/models' 4import { 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,