Browse Source

Hide currency on mobile

pull/8114/head
Thomas Kaul 5 days ago
parent
commit
8df2a67080
  1. 10
      apps/client/src/app/components/home-overview/home-overview.component.ts
  2. 2
      apps/client/src/app/components/portfolio-performance/portfolio-performance.component.ts

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(() => {
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);

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 unit = input.required<string>();
public readonly unit = input<string>();
private readonly value =
viewChild.required<ElementRef<HTMLSpanElement>>('value');

Loading…
Cancel
Save