|
|
@ -21,6 +21,7 @@ import { DataService } from '@ghostfolio/ui/services'; |
|
|
import { |
|
|
import { |
|
|
ChangeDetectorRef, |
|
|
ChangeDetectorRef, |
|
|
Component, |
|
|
Component, |
|
|
|
|
|
computed, |
|
|
DestroyRef, |
|
|
DestroyRef, |
|
|
inject, |
|
|
inject, |
|
|
OnInit |
|
|
OnInit |
|
|
@ -42,7 +43,10 @@ import { DeviceDetectorService } from 'ngx-device-detector'; |
|
|
templateUrl: './home-overview.html' |
|
|
templateUrl: './home-overview.html' |
|
|
}) |
|
|
}) |
|
|
export class GfHomeOverviewComponent implements OnInit { |
|
|
export class GfHomeOverviewComponent implements OnInit { |
|
|
protected deviceType: string; |
|
|
protected readonly deviceType = computed( |
|
|
|
|
|
() => this.deviceDetectorService.deviceInfo().deviceType |
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
protected errors: AssetProfileIdentifier[]; |
|
|
protected errors: AssetProfileIdentifier[]; |
|
|
protected hasImpersonationId: boolean; |
|
|
protected hasImpersonationId: boolean; |
|
|
protected hasPermissionToCreateActivity: boolean; |
|
|
protected hasPermissionToCreateActivity: boolean; |
|
|
@ -87,8 +91,6 @@ export class GfHomeOverviewComponent implements OnInit { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public ngOnInit() { |
|
|
public ngOnInit() { |
|
|
this.deviceType = this.deviceDetectorService.getDeviceInfo().deviceType; |
|
|
|
|
|
|
|
|
|
|
|
this.showDetails = |
|
|
this.showDetails = |
|
|
!this.user.settings.isRestrictedView && |
|
|
!this.user.settings.isRestrictedView && |
|
|
this.user.settings.viewMode !== 'ZEN'; |
|
|
this.user.settings.viewMode !== 'ZEN'; |
|
|
@ -137,7 +139,7 @@ export class GfHomeOverviewComponent implements OnInit { |
|
|
) ?? null; |
|
|
) ?? null; |
|
|
|
|
|
|
|
|
if ( |
|
|
if ( |
|
|
this.deviceType === 'mobile' && |
|
|
this.deviceType() === 'mobile' && |
|
|
this.performance.currentValueInBaseCurrency >= |
|
|
this.performance.currentValueInBaseCurrency >= |
|
|
NUMERICAL_PRECISION_THRESHOLD_6_FIGURES |
|
|
NUMERICAL_PRECISION_THRESHOLD_6_FIGURES |
|
|
) { |
|
|
) { |
|
|
|