Browse Source

Task/hide currency in portfolio performance on mobile (#8114)

* Hide currency on mobile

* Update changelog
pull/8117/merge
Thomas Kaul 11 hours ago
committed by GitHub
parent
commit
016572e99c
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 10
      apps/client/src/app/components/home-overview/home-overview.component.ts
  3. 2
      apps/client/src/app/components/portfolio-performance/portfolio-performance.component.ts

1
CHANGELOG.md

@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed ### Changed
- Simplified the portfolio performance on the overview tab of the home page by hiding the currency on mobile
- Extended the access to share the portfolio with the Model Context Protocol (MCP) to support the _View_ and the _View and manage_ permissions (experimental) - Extended the access to share the portfolio with the Model Context Protocol (MCP) to support the _View_ and the _View and manage_ permissions (experimental)
- Improved the performance of getting the historical market data by selecting only the required columns - Improved the performance of getting the historical market data by selecting only the required columns

10
apps/client/src/app/components/home-overview/home-overview.component.ts

@ -106,11 +106,13 @@ export class GfHomeOverviewComponent implements OnInit {
}); });
protected readonly unit = computed(() => { protected readonly unit = computed(() => {
const user = this.user(); if (!this.showDetails()) {
return '%';
}
return this.showDetails() return this.deviceType() === 'mobile'
? (user?.settings?.baseCurrency ?? DEFAULT_CURRENCY) ? undefined
: '%'; : (this.user()?.settings?.baseCurrency ?? DEFAULT_CURRENCY);
}); });
private readonly dataService = inject(DataService); private readonly dataService = inject(DataService);

2
apps/client/src/app/components/portfolio-performance/portfolio-performance.component.ts

@ -44,7 +44,7 @@ export class GfPortfolioPerformanceComponent {
} }
}); });
public readonly showDetails = input<boolean>(false); public readonly showDetails = input<boolean>(false);
public readonly unit = input.required<string>(); public readonly unit = input.required<string | undefined>();
private readonly value = private readonly value =
viewChild.required<ElementRef<HTMLSpanElement>>('value'); viewChild.required<ElementRef<HTMLSpanElement>>('value');

Loading…
Cancel
Save