aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-08-27 09:30:32 +0200
committerChocobozzz <me@florianbigard.com>2021-08-27 09:30:32 +0200
commit1ff15061b31245df4248e47228d0a90b07ab3f01 (patch)
tree7d981a54cfec919d0f83afca68b2fce6b696d6d2
parentbf80903fde923e0c84226ac442a2a382db74aee4 (diff)
downloadPeerTube-1ff15061b31245df4248e47228d0a90b07ab3f01.tar.gz
PeerTube-1ff15061b31245df4248e47228d0a90b07ab3f01.tar.zst
PeerTube-1ff15061b31245df4248e47228d0a90b07ab3f01.zip
Avoid layout shift in account setup modal
-rw-r--r--client/src/app/modal/account-setup-modal.component.html2
-rw-r--r--client/src/app/modal/account-setup-modal.component.scss3
-rw-r--r--client/src/app/modal/account-setup-modal.component.ts3
3 files changed, 5 insertions, 3 deletions
diff --git a/client/src/app/modal/account-setup-modal.component.html b/client/src/app/modal/account-setup-modal.component.html
index 55bae78bf..d1f153835 100644
--- a/client/src/app/modal/account-setup-modal.component.html
+++ b/client/src/app/modal/account-setup-modal.component.html
@@ -5,7 +5,7 @@
5 </div> 5 </div>
6 6
7 <div class="modal-body"> 7 <div class="modal-body">
8 <img class="mascot" src="/client/assets/images/mascot/happy.svg" alt="mascot"> 8 <img class="mascot" src="/client/assets/images/mascot/happy.svg" alt="">
9 9
10 <div i18n class="subtitle">It's time to set up your account profile!</div> 10 <div i18n class="subtitle">It's time to set up your account profile!</div>
11 11
diff --git a/client/src/app/modal/account-setup-modal.component.scss b/client/src/app/modal/account-setup-modal.component.scss
index 405f29d65..d99edaf7a 100644
--- a/client/src/app/modal/account-setup-modal.component.scss
+++ b/client/src/app/modal/account-setup-modal.component.scss
@@ -17,7 +17,8 @@
17 @include margin-right(2rem); 17 @include margin-right(2rem);
18 18
19 display: block; 19 display: block;
20 min-width: 170px; 20 width: 170px;
21 height: 220px;
21} 22}
22 23
23.subtitle { 24.subtitle {
diff --git a/client/src/app/modal/account-setup-modal.component.ts b/client/src/app/modal/account-setup-modal.component.ts
index 8256f5103..4cb8de2c7 100644
--- a/client/src/app/modal/account-setup-modal.component.ts
+++ b/client/src/app/modal/account-setup-modal.component.ts
@@ -45,11 +45,12 @@ export class AccountSetupModalComponent implements OnInit {
45 45
46 ngOnInit () { 46 ngOnInit () {
47 this.serverConfig = this.serverService.getHTMLConfig() 47 this.serverConfig = this.serverService.getHTMLConfig()
48 this.user = this.authService.getUser()
49 48
50 this.authService.userInformationLoaded 49 this.authService.userInformationLoaded
51 .subscribe( 50 .subscribe(
52 () => { 51 () => {
52 this.user = this.authService.getUser()
53
53 if (this.isUserRoot) return 54 if (this.isUserRoot) return
54 if (this.hasAccountAvatar && this.hasAccountDescription) return 55 if (this.hasAccountAvatar && this.hasAccountDescription) return
55 if (this.userService.hasSignupInThisSession()) return 56 if (this.userService.hasSignupInThisSession()) return