diff --git a/package.json b/package.json index f207413027..a75c5661b1 100755 --- a/package.json +++ b/package.json @@ -1,10 +1,10 @@ { "name": "planet", "license": "AGPL-3.0", - "version": "0.15.22", + "version": "0.15.24", "myplanet": { - "latest": "v0.20.75", - "min": "v0.19.75" + "latest": "v0.20.76", + "min": "v0.19.76" }, "scripts": { "ng": "ng", diff --git a/src/app/community/community.component.html b/src/app/community/community.component.html index d9ebcd7a5f..d1737d6b2c 100644 --- a/src/app/community/community.component.html +++ b/src/app/community/community.component.html @@ -8,9 +8,14 @@

- - + + Loading voices... + + + + +

No Voices available.

@@ -44,7 +49,8 @@

- + +

No links available.

{{link.title}} diff --git a/src/app/community/community.component.ts b/src/app/community/community.component.ts index 6c81a417cc..5e8fc082bd 100644 --- a/src/app/community/community.component.ts +++ b/src/app/community/community.component.ts @@ -48,6 +48,7 @@ export class CommunityComponent implements OnInit, OnDestroy { resizeCalendar: any = false; deviceType: DeviceType; deviceTypes = DeviceType; + isLoading: boolean; constructor( private dialog: MatDialog, @@ -68,9 +69,11 @@ export class CommunityComponent implements OnInit, OnDestroy { ngOnInit() { const newsSortValue = (item: any) => item.sharedDate || item.doc.time; + this.isLoading = true; this.getCommunityData(); this.newsService.newsUpdated$.pipe(takeUntil(this.onDestroy$)).subscribe(news => { this.news = news.sort((a, b) => newsSortValue(b) - newsSortValue(a)); + this.isLoading = false; }); this.usersService.usersListener(true).pipe(takeUntil(this.onDestroy$)).subscribe(users => { if (!this.planetCode) { diff --git a/src/app/users/users-profile/users-profile.component.html b/src/app/users/users-profile/users-profile.component.html index 68d8d678be..7df6b956b2 100644 --- a/src/app/users/users-profile/users-profile.component.html +++ b/src/app/users/users-profile/users-profile.component.html @@ -1,7 +1,11 @@ - - Member Profile - + + + Member Profile + +
@@ -9,12 +13,24 @@ {{userDetail.name}} + + + + + + - - Change Password - + + + Change Password + +
diff --git a/src/app/users/users-profile/users-profile.component.ts b/src/app/users/users-profile/users-profile.component.ts index 77c68997c8..4c5d65b902 100644 --- a/src/app/users/users-profile/users-profile.component.ts +++ b/src/app/users/users-profile/users-profile.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit, OnDestroy, Input } from '@angular/core'; +import { Component, OnInit, OnDestroy, Input, HostListener } from '@angular/core'; import { ActivatedRoute, ParamMap, Router } from '@angular/router'; import { Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; @@ -9,6 +9,7 @@ import { UsersAchievementsService } from '../users-achievements/users-achievemen import { findDocuments } from '../../shared/mangoQueries'; import { StateService } from '../../shared/state.service'; import { educationLevel } from '../user-constants'; +import { DeviceInfoService, DeviceType } from '../../shared/device-info.service'; @Component({ selector: 'planet-users-profile', @@ -27,6 +28,8 @@ export class UsersProfileComponent implements OnInit, OnDestroy { totalLogins = 0; lastLogin = 0; educationLevel = educationLevel; + deviceType: DeviceType; + isMobile: boolean; private onDestroy$ = new Subject(); @Input() planetCode: string | null = null; @Input() isDialog: boolean; @@ -38,8 +41,12 @@ export class UsersProfileComponent implements OnInit, OnDestroy { private userService: UserService, private router: Router, private usersAchievementsService: UsersAchievementsService, - private stateService: StateService - ) { } + private stateService: StateService, + private deviceInfoService: DeviceInfoService + ) { + this.deviceType = this.deviceInfoService.getDeviceType(); + this.isMobile = this.deviceType === DeviceType.MOBILE; + } ngOnInit() { this.user = this.userService.get(); @@ -56,6 +63,12 @@ export class UsersProfileComponent implements OnInit, OnDestroy { }); } + @HostListener('window:resize') + onResize() { + this.deviceType = this.deviceInfoService.getDeviceType(); + this.isMobile = this.deviceType === DeviceType.MOBILE; + } + ngOnDestroy() { this.onDestroy$.next(); this.onDestroy$.complete();