MOBILE-3320 more: Add loading when logging out

main
Pau Ferrer Ocaña 2021-06-01 11:50:43 +02:00
parent 49f6cc56e5
commit 94205791b5
2 changed files with 84 additions and 80 deletions

View File

@ -8,6 +8,7 @@
</ion-toolbar> </ion-toolbar>
</ion-header> </ion-header>
<ion-content> <ion-content>
<core-loading [hideUntil]="!loggedOut">
<ion-list> <ion-list>
<ion-item button *ngIf="siteInfo" class="ion-text-wrap" core-user-link [userId]="siteInfo.userid"> <ion-item button *ngIf="siteInfo" class="ion-text-wrap" core-user-link [userId]="siteInfo.userid">
<core-user-avatar [user]="siteInfo" slot="start"></core-user-avatar> <core-user-avatar [user]="siteInfo" slot="start"></core-user-avatar>
@ -94,4 +95,5 @@
</ion-label> </ion-label>
</ion-item> </ion-item>
</ion-list> </ion-list>
</core-loading>
</ion-content> </ion-content>

View File

@ -50,6 +50,7 @@ export class CoreMainMenuMorePage implements OnInit, OnDestroy {
docsUrl?: string; docsUrl?: string;
customItems?: CoreMainMenuCustomItem[]; customItems?: CoreMainMenuCustomItem[];
siteUrl?: string; siteUrl?: string;
loggedOut = false;
protected subscription!: Subscription; protected subscription!: Subscription;
protected langObserver: CoreEventObserver; protected langObserver: CoreEventObserver;
@ -203,6 +204,7 @@ export class CoreMainMenuMorePage implements OnInit, OnDestroy {
* Logout the user. * Logout the user.
*/ */
logout(): void { logout(): void {
this.loggedOut = true;
CoreSites.logout(); CoreSites.logout();
} }