MOBILE-3814 user-menu: Add loading spinner

main
Pau Ferrer Ocaña 2022-03-09 16:39:51 +01:00
parent b0165e87e4
commit 74670a2702
2 changed files with 52 additions and 53 deletions

View File

@ -13,6 +13,7 @@
</ion-toolbar>
</ion-header>
<ion-content>
<core-loading [hideUntil]="siteLogoLoaded && handlersLoaded">
<ion-list>
<ion-item button class="core-usermenu-siteinfo ion-text-wrap" *ngIf="siteInfo" lines="full" detail="false" [href]="siteUrl"
core-link auto-login="yes">
@ -66,6 +67,7 @@
</ion-label>
</ion-item>
</ion-list>
</core-loading>
</ion-content>
<ion-footer>
<ion-item *ngIf="displaySwitchAccount" button lines="full" (click)="switchAccounts($event)" detail="true" class="ion-text-wrap">

View File

@ -49,7 +49,6 @@ export class CoreMainMenuUserMenuComponent implements OnInit, OnDestroy {
siteUrl?: string;
handlers: CoreUserProfileHandlerData[] = [];
handlersLoaded = false;
loaded = false;
user?: CoreUserProfile;
displaySwitchAccount = true;
removeAccountOnLogout = false;
@ -68,8 +67,6 @@ export class CoreMainMenuUserMenuComponent implements OnInit, OnDestroy {
this.displaySwitchAccount = !currentSite.isFeatureDisabled('NoDelegate_SwitchAccount');
this.removeAccountOnLogout = !!CoreConstants.CONFIG.removeaccountonlogout;
this.loaded = true;
this.loadSiteLogo(currentSite);
// Load the handlers.