Avoid layout shift in account setup modal

This commit is contained in:
Chocobozzz 2021-08-27 09:30:32 +02:00
parent bf80903fde
commit 1ff15061b3
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
3 changed files with 5 additions and 3 deletions

View File

@ -5,7 +5,7 @@
</div> </div>
<div class="modal-body"> <div class="modal-body">
<img class="mascot" src="/client/assets/images/mascot/happy.svg" alt="mascot"> <img class="mascot" src="/client/assets/images/mascot/happy.svg" alt="">
<div i18n class="subtitle">It's time to set up your account profile!</div> <div i18n class="subtitle">It's time to set up your account profile!</div>

View File

@ -17,7 +17,8 @@
@include margin-right(2rem); @include margin-right(2rem);
display: block; display: block;
min-width: 170px; width: 170px;
height: 220px;
} }
.subtitle { .subtitle {

View File

@ -45,11 +45,12 @@ export class AccountSetupModalComponent implements OnInit {
ngOnInit () { ngOnInit () {
this.serverConfig = this.serverService.getHTMLConfig() this.serverConfig = this.serverService.getHTMLConfig()
this.user = this.authService.getUser()
this.authService.userInformationLoaded this.authService.userInformationLoaded
.subscribe( .subscribe(
() => { () => {
this.user = this.authService.getUser()
if (this.isUserRoot) return if (this.isUserRoot) return
if (this.hasAccountAvatar && this.hasAccountDescription) return if (this.hasAccountAvatar && this.hasAccountDescription) return
if (this.userService.hasSignupInThisSession()) return if (this.userService.hasSignupInThisSession()) return