Skip to content

Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍

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

Thomas Kaul016572e99ce6
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 919032a762..5216b1726a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### 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)
- Improved the performance of getting the historical market data by selecting only the required columns
diff --git a/apps/client/src/app/components/home-overview/home-overview.component.ts b/apps/client/src/app/components/home-overview/home-overview.component.ts
index 3cecc5e5de..c7b880efce 100644
--- a/apps/client/src/app/components/home-overview/home-overview.component.ts
+++ b/apps/client/src/app/components/home-overview/home-overview.component.ts
@@ -106,11 +106,13 @@ export class GfHomeOverviewComponent implements OnInit {
});
protected readonly unit = computed(() => {
- const user = this.user();
+ if (!this.showDetails()) {
+ return '%';
+ }
- return this.showDetails()
- ? (user?.settings?.baseCurrency ?? DEFAULT_CURRENCY)
- : '%';
+ return this.deviceType() === 'mobile'
+ ? undefined
+ : (this.user()?.settings?.baseCurrency ?? DEFAULT_CURRENCY);
});
private readonly dataService = inject(DataService);
diff --git a/apps/client/src/app/components/portfolio-performance/portfolio-performance.component.ts b/apps/client/src/app/components/portfolio-performance/portfolio-performance.component.ts
index aade357b78..04929e03a6 100644
--- a/apps/client/src/app/components/portfolio-performance/portfolio-performance.component.ts
+++ b/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 unit = input.required<string>();
+ public readonly unit = input.required<string | undefined>();
private readonly value =
viewChild.required<ElementRef<HTMLSpanElement>>('value');