Browse Source

Merge branch 'main' into bugfix/readd-value-in-base-currency-to-activity

pull/3078/head
Thomas Kaul 2 years ago
committed by GitHub
parent
commit
b77fde3b3a
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      CHANGELOG.md
  2. 6
      apps/client/src/app/pages/faq/self-hosting/self-hosting-page.html
  3. 2
      libs/common/src/lib/helper.ts
  4. 2
      libs/ui/src/lib/benchmark/benchmark.component.html
  5. 2
      libs/ui/src/lib/benchmark/benchmark.component.ts
  6. 8
      libs/ui/src/lib/i18n.ts

4
CHANGELOG.md

@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased ## Unreleased
### Changed
- Improved the usability of the benchmarks in the markets overview
### Fixed ### Fixed
- Fixed a missing value in the activities table on mobile - Fixed a missing value in the activities table on mobile

6
apps/client/src/app/pages/faq/self-hosting/self-hosting-page.html

@ -24,9 +24,9 @@
</mat-card-header> </mat-card-header>
<mat-card-content> <mat-card-content>
<p> <p>
Ghostfolio manages currencies automatically based on all the recored Ghostfolio manages currencies automatically based on all the
activities. If you need an additional currency, you can manually recorded activities. If you need an additional currency, you can
enter it. manually enter it.
</p> </p>
<ol> <ol>
<li>Go to the <i>Admin Control</i> panel</li> <li>Go to the <i>Admin Control</i> panel</li>

2
libs/common/src/lib/helper.ts

@ -393,6 +393,6 @@ export function resolveMarketCondition(
} else if (aMarketCondition === 'BEAR_MARKET') { } else if (aMarketCondition === 'BEAR_MARKET') {
return { emoji: '🐻' }; return { emoji: '🐻' };
} else { } else {
return { emoji: '⚪' }; return { emoji: undefined };
} }
} }

2
libs/ui/src/lib/benchmark/benchmark.component.html

@ -102,7 +102,7 @@
<th *matHeaderCellDef mat-header-cell></th> <th *matHeaderCellDef mat-header-cell></th>
<td *matCellDef="let element" class="px-0" mat-cell> <td *matCellDef="let element" class="px-0" mat-cell>
@if (element?.marketCondition) { @if (element?.marketCondition) {
<div class="text-center" [title]="element?.marketCondition"> <div class="text-center" [title]="translate(element.marketCondition)">
{{ resolveMarketCondition(element.marketCondition).emoji }} {{ resolveMarketCondition(element.marketCondition).emoji }}
</div> </div>
} }

2
libs/ui/src/lib/benchmark/benchmark.component.ts

@ -1,5 +1,6 @@
import { getLocale, resolveMarketCondition } from '@ghostfolio/common/helper'; import { getLocale, resolveMarketCondition } from '@ghostfolio/common/helper';
import { Benchmark, User } from '@ghostfolio/common/interfaces'; import { Benchmark, User } from '@ghostfolio/common/interfaces';
import { translate } from '@ghostfolio/ui/i18n';
import { import {
ChangeDetectionStrategy, ChangeDetectionStrategy,
@ -21,6 +22,7 @@ export class BenchmarkComponent implements OnChanges {
public displayedColumns = ['name', 'date', 'change', 'marketCondition']; public displayedColumns = ['name', 'date', 'change', 'marketCondition'];
public resolveMarketCondition = resolveMarketCondition; public resolveMarketCondition = resolveMarketCondition;
public translate = translate;
public constructor() {} public constructor() {}

8
libs/ui/src/lib/i18n.ts

@ -35,14 +35,14 @@ const locales = {
LIABILITY: $localize`Liability`, LIABILITY: $localize`Liability`,
SELL: $localize`Sell`, SELL: $localize`Sell`,
// enum AssetClass // AssetClass (enum)
CASH: $localize`Cash`, CASH: $localize`Cash`,
COMMODITY: $localize`Commodity`, COMMODITY: $localize`Commodity`,
EQUITY: $localize`Equity`, EQUITY: $localize`Equity`,
FIXED_INCOME: $localize`Fixed Income`, FIXED_INCOME: $localize`Fixed Income`,
REAL_ESTATE: $localize`Real Estate`, REAL_ESTATE: $localize`Real Estate`,
// enum AssetSubClass // AssetSubClass (enum)
BOND: $localize`Bond`, BOND: $localize`Bond`,
CRYPTOCURRENCY: $localize`Cryptocurrency`, CRYPTOCURRENCY: $localize`Cryptocurrency`,
ETF: $localize`ETF`, ETF: $localize`ETF`,
@ -51,6 +51,10 @@ const locales = {
PRIVATE_EQUITY: $localize`Private Equity`, PRIVATE_EQUITY: $localize`Private Equity`,
STOCK: $localize`Stock`, STOCK: $localize`Stock`,
// Benchmark
ALL_TIME_HIGH: 'All time high',
BEAR_MARKET: 'Bear market',
// Continents // Continents
Africa: $localize`Africa`, Africa: $localize`Africa`,
Asia: $localize`Asia`, Asia: $localize`Asia`,

Loading…
Cancel
Save