Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
aa078588e8 | |||
fcef0a72d5 | |||
29987d3e2f | |||
6284b4dfe8 | |||
00342ca1f7 | |||
234c4fd511 | |||
669f1fb60c |
15
CHANGELOG.md
15
CHANGELOG.md
@ -5,6 +5,21 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## 2.19.0 - 2023-11-06
|
||||
|
||||
### Added
|
||||
|
||||
- Added a data migration to set `accountType` to `NULL` in the account database table
|
||||
|
||||
### Changed
|
||||
|
||||
- Improved the language localization for the _Fear & Greed Index_ (market mood)
|
||||
- Improved the language localization for German (`de`)
|
||||
|
||||
### Fixed
|
||||
|
||||
- Improved the handling of derived currencies (`GBp`, `ILA`, `ZAc`)
|
||||
|
||||
## 2.18.0 - 2023-11-05
|
||||
|
||||
### Added
|
||||
|
24
README.md
24
README.md
@ -230,18 +230,18 @@ Deprecated: `GET http://localhost:3333/api/v1/auth/anonymous/<INSERT_SECURITY_TO
|
||||
}
|
||||
```
|
||||
|
||||
| Field | Type | Description |
|
||||
| ---------- | ------------------- | -------------------------------------------------- |
|
||||
| accountId | string (`optional`) | Id of the account |
|
||||
| comment | string (`optional`) | Comment of the activity |
|
||||
| currency | string | `CHF` \| `EUR` \| `USD` etc. |
|
||||
| dataSource | string | `MANUAL` (for type `ITEM`) \| `YAHOO` |
|
||||
| date | string | Date in the format `ISO-8601` |
|
||||
| fee | number | Fee of the activity |
|
||||
| quantity | number | Quantity of the activity |
|
||||
| symbol | string | Symbol of the activity (suitable for `dataSource`) |
|
||||
| type | string | `BUY` \| `DIVIDEND` \| `ITEM` \| `SELL` |
|
||||
| unitPrice | number | Price per unit of the activity |
|
||||
| Field | Type | Description |
|
||||
| ---------- | ------------------- | ----------------------------------------------------------------------------- |
|
||||
| accountId | string (`optional`) | Id of the account |
|
||||
| comment | string (`optional`) | Comment of the activity |
|
||||
| currency | string | `CHF` \| `EUR` \| `USD` etc. |
|
||||
| dataSource | string | `COINGECKO` \| `MANUAL` (for type `ITEM`) \| `YAHOO` |
|
||||
| date | string | Date in the format `ISO-8601` |
|
||||
| fee | number | Fee of the activity |
|
||||
| quantity | number | Quantity of the activity |
|
||||
| symbol | string | Symbol of the activity (suitable for `dataSource`) |
|
||||
| type | string | `BUY` \| `DIVIDEND` \| `FEE` \| `INTEREST` \| `ITEM` \| `LIABILITY` \| `SELL` |
|
||||
| unitPrice | number | Price per unit of the activity |
|
||||
|
||||
#### Response
|
||||
|
||||
|
@ -95,6 +95,30 @@ export class ExchangeRateDataService {
|
||||
const [currency1, currency2] = symbol.match(/.{1,3}/g);
|
||||
const [date] = Object.keys(result[symbol]);
|
||||
|
||||
// Add derived currencies
|
||||
if (currency2 === 'GBP') {
|
||||
resultExtended[`${currency1}GBp`] = {
|
||||
[date]: {
|
||||
marketPrice:
|
||||
result[`${currency1}${currency2}`][date].marketPrice * 100
|
||||
}
|
||||
};
|
||||
} else if (currency2 === 'ILS') {
|
||||
resultExtended[`${currency1}ILA`] = {
|
||||
[date]: {
|
||||
marketPrice:
|
||||
result[`${currency1}${currency2}`][date].marketPrice * 100
|
||||
}
|
||||
};
|
||||
} else if (currency2 === 'ZAR') {
|
||||
resultExtended[`${currency1}ZAc`] = {
|
||||
[date]: {
|
||||
marketPrice:
|
||||
result[`${currency1}${currency2}`][date].marketPrice * 100
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// Calculate the opposite direction
|
||||
resultExtended[`${currency2}${currency1}`] = {
|
||||
[date]: {
|
||||
|
@ -6,6 +6,7 @@ import {
|
||||
OnInit
|
||||
} from '@angular/core';
|
||||
import { resolveFearAndGreedIndex } from '@ghostfolio/common/helper';
|
||||
import { translate } from '@ghostfolio/ui/i18n';
|
||||
|
||||
@Component({
|
||||
selector: 'gf-fear-and-greed-index',
|
||||
@ -24,9 +25,9 @@ export class FearAndGreedIndexComponent implements OnChanges, OnInit {
|
||||
public ngOnInit() {}
|
||||
|
||||
public ngOnChanges() {
|
||||
const { emoji, text } = resolveFearAndGreedIndex(this.fearAndGreedIndex);
|
||||
const { emoji, key } = resolveFearAndGreedIndex(this.fearAndGreedIndex);
|
||||
|
||||
this.fearAndGreedIndexEmoji = emoji;
|
||||
this.fearAndGreedIndexText = text;
|
||||
this.fearAndGreedIndexText = translate(key);
|
||||
}
|
||||
}
|
||||
|
@ -28,7 +28,7 @@
|
||||
year.
|
||||
</p>
|
||||
<p>
|
||||
In this debrief, we’ll take a closer look at our journey during
|
||||
In this debriefing, we’ll take a closer look at our journey during
|
||||
Hacktoberfest, exploring the facts and figures, key takeaways, and
|
||||
the impact on Ghostfolio.
|
||||
</p>
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -311,15 +311,15 @@ export function resetHours(aDate: Date) {
|
||||
|
||||
export function resolveFearAndGreedIndex(aValue: number) {
|
||||
if (aValue <= 25) {
|
||||
return { emoji: '🥵', text: 'Extreme Fear' };
|
||||
return { emoji: '🥵', key: 'EXTREME_FEAR', text: 'Extreme Fear' };
|
||||
} else if (aValue <= 45) {
|
||||
return { emoji: '😨', text: 'Fear' };
|
||||
return { emoji: '😨', key: 'FEAR', text: 'Fear' };
|
||||
} else if (aValue <= 55) {
|
||||
return { emoji: '😐', text: 'Neutral' };
|
||||
return { emoji: '😐', key: 'NEUTRAL', text: 'Neutral' };
|
||||
} else if (aValue < 75) {
|
||||
return { emoji: '😜', text: 'Greed' };
|
||||
return { emoji: '😜', key: 'GREED', text: 'Greed' };
|
||||
} else {
|
||||
return { emoji: '🤪', text: 'Extreme Greed' };
|
||||
return { emoji: '🤪', key: 'EXTREME_GREED', text: 'Extreme Greed' };
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -57,7 +57,14 @@ const locales = {
|
||||
Europe: $localize`Europe`,
|
||||
'North America': $localize`North America`,
|
||||
Oceania: $localize`Oceania`,
|
||||
'South America': $localize`South America`
|
||||
'South America': $localize`South America`,
|
||||
|
||||
// Fear and Greed Index
|
||||
EXTREME_FEAR: $localize`Extreme Fear`,
|
||||
EXTREME_GREED: $localize`Extreme Greed`,
|
||||
FEAR: $localize`Fear`,
|
||||
GREED: $localize`Greed`,
|
||||
NEUTRAL: $localize`Neutral`
|
||||
};
|
||||
|
||||
export function translate(aKey: string): string {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ghostfolio",
|
||||
"version": "2.18.0",
|
||||
"version": "2.19.0",
|
||||
"homepage": "https://ghostfol.io",
|
||||
"license": "AGPL-3.0",
|
||||
"repository": "https://github.com/ghostfolio/ghostfolio",
|
||||
|
@ -0,0 +1,2 @@
|
||||
-- AlterTable
|
||||
UPDATE "Account" SET "accountType" = NULL;
|
Reference in New Issue
Block a user