diff --git a/CHANGELOG.md b/CHANGELOG.md index fc9c8715e..6ad8b4122 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Improved the style of the symbol search component +## 2.124.1 - 2024-11-25 + +### Fixed + +- Fixed the tables style related to sticky columns + ## 2.124.0 - 2024-11-24 ### Added diff --git a/apps/api/src/services/data-provider/ghostfolio/ghostfolio.service.ts b/apps/api/src/services/data-provider/ghostfolio/ghostfolio.service.ts index a1ac6b657..acd66b0af 100644 --- a/apps/api/src/services/data-provider/ghostfolio/ghostfolio.service.ts +++ b/apps/api/src/services/data-provider/ghostfolio/ghostfolio.service.ts @@ -31,7 +31,6 @@ import got from 'got'; @Injectable() export class GhostfolioService implements DataProviderInterface { - private apiKey: string; private readonly URL = environment.production ? 'https://ghostfol.io/api' : `${this.configurationService.get('ROOT_URL')}/api`; @@ -39,15 +38,7 @@ export class GhostfolioService implements DataProviderInterface { public constructor( private readonly configurationService: ConfigurationService, private readonly propertyService: PropertyService - ) { - void this.initialize(); - } - - public async initialize() { - this.apiKey = (await this.propertyService.getByKey( - PROPERTY_API_KEY_GHOSTFOLIO - )) as string; - } + ) {} public canHandle() { return true; @@ -105,7 +96,7 @@ export class GhostfolioService implements DataProviderInterface { DATE_FORMAT )}`, { - headers: this.getRequestHeaders(), + headers: await this.getRequestHeaders(), // @ts-ignore signal: abortController.signal } @@ -154,7 +145,7 @@ export class GhostfolioService implements DataProviderInterface { const { quotes } = await got( `${this.URL}/v1/data-providers/ghostfolio/quotes?symbols=${symbols.join(',')}`, { - headers: this.getRequestHeaders(), + headers: await this.getRequestHeaders(), // @ts-ignore signal: abortController.signal } @@ -193,7 +184,7 @@ export class GhostfolioService implements DataProviderInterface { searchResult = await got( `${this.URL}/v1/data-providers/ghostfolio/lookup?query=${query}`, { - headers: this.getRequestHeaders(), + headers: await this.getRequestHeaders(), // @ts-ignore signal: abortController.signal } @@ -213,9 +204,13 @@ export class GhostfolioService implements DataProviderInterface { return searchResult; } - private getRequestHeaders() { + private async getRequestHeaders() { + const apiKey = (await this.propertyService.getByKey( + PROPERTY_API_KEY_GHOSTFOLIO + )) as string; + return { - [HEADER_KEY_TOKEN]: `Bearer ${this.apiKey}` + [HEADER_KEY_TOKEN]: `Bearer ${apiKey}` }; } } diff --git a/apps/client/src/app/components/admin-settings/admin-settings.component.ts b/apps/client/src/app/components/admin-settings/admin-settings.component.ts index d25cdfbcd..68256bf98 100644 --- a/apps/client/src/app/components/admin-settings/admin-settings.component.ts +++ b/apps/client/src/app/components/admin-settings/admin-settings.component.ts @@ -3,7 +3,10 @@ import { NotificationService } from '@ghostfolio/client/core/notification/notifi import { AdminService } from '@ghostfolio/client/services/admin.service'; import { DataService } from '@ghostfolio/client/services/data.service'; import { UserService } from '@ghostfolio/client/services/user/user.service'; -import { PROPERTY_API_KEY_GHOSTFOLIO } from '@ghostfolio/common/config'; +import { + DEFAULT_LANGUAGE_CODE, + PROPERTY_API_KEY_GHOSTFOLIO +} from '@ghostfolio/common/config'; import { DataProviderGhostfolioStatusResponse, User @@ -56,8 +59,11 @@ export class AdminSettingsComponent implements OnDestroy, OnInit { if (state?.user) { this.user = state.user; + const languageCode = + this.user?.settings?.language ?? DEFAULT_LANGUAGE_CODE; + this.pricingUrl = - `https://ghostfol.io/${this.user.settings.language}/` + + `https://ghostfol.io/${languageCode}/` + $localize`:snake-case:pricing`; this.changeDetectorRef.markForCheck(); diff --git a/apps/client/src/styles/table.scss b/apps/client/src/styles/table.scss index 8c0f5c283..f232cb1af 100644 --- a/apps/client/src/styles/table.scss +++ b/apps/client/src/styles/table.scss @@ -1,10 +1,5 @@ @mixin gf-table($darkTheme: false) { --mat-table-background-color: var(--light-background); - --mat-table-background-color-even: rgba(var(--palette-foreground-base), 0.02); - --mat-table-background-color-hover: rgba( - var(--palette-foreground-base), - 0.04 - ); .mat-footer-row, .mat-row { @@ -26,24 +21,16 @@ .mat-mdc-row { &:nth-child(even) { - background-color: var(--mat-table-background-color-even); + background-color: whitesmoke; } &:hover { - background-color: var(--mat-table-background-color-hover) !important; + background-color: #e6e6e6 !important; } } @if $darkTheme { --mat-table-background-color: var(--dark-background); - --mat-table-background-color-even: rgba( - var(--palette-foreground-base-dark), - 0.02 - ); - --mat-table-background-color-hover: rgba( - var(--palette-foreground-base-dark), - 0.04 - ); .mat-mdc-footer-row { .mat-mdc-footer-cell { @@ -53,5 +40,15 @@ ); } } + + .mat-mdc-row { + &:nth-child(even) { + background-color: #222222; + } + + &:hover { + background-color: #303030 !important; + } + } } } diff --git a/package-lock.json b/package-lock.json index e20a62d6b..c6720ef96 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "ghostfolio", - "version": "2.124.0", + "version": "2.124.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ghostfolio", - "version": "2.124.0", + "version": "2.124.1", "hasInstallScript": true, "license": "AGPL-3.0", "dependencies": { diff --git a/package.json b/package.json index 4459c65a3..9332f33e6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ghostfolio", - "version": "2.124.0", + "version": "2.124.1", "homepage": "https://ghostfol.io", "license": "AGPL-3.0", "repository": "https://github.com/ghostfolio/ghostfolio",