diff --git a/package.json b/package.json index f207413027..f74c618060 100755 --- a/package.json +++ b/package.json @@ -1,10 +1,10 @@ { "name": "planet", "license": "AGPL-3.0", - "version": "0.15.22", + "version": "0.15.23", "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/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();