diff --git a/CHANGELOG.md b/CHANGELOG.md index 85e87face..459ab1dcf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,8 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +### Changed + +- Improved the styling of the checkboxes to consistently use the primary color in their states +- Improved the name display in the activities table +- Improved the user id display in the users table of the admin control panel +- Improved the language localization for German (`de`) + ### Fixed +- Fixed a chart error on interaction by registering the annotation plugin early +- Fixed an issue on the allocations page where clicking an account in the _By Account_ chart did not open the detail dialog - Restricted the maximum height of the import activities dialog ## 3.11.0 - 2026-06-14 diff --git a/apps/client/src/app/components/admin-users/admin-users.html b/apps/client/src/app/components/admin-users/admin-users.html index 87ab9defc..0899c57d1 100644 --- a/apps/client/src/app/components/admin-users/admin-users.html +++ b/apps/client/src/app/components/admin-users/admin-users.html @@ -16,7 +16,7 @@ class="mat-mdc-cell px-1 py-2" mat-cell > -
+
or start a discussion at   GitHubGitHub.GitHub. or start a discussion at GitHub. or start a discussion at - oder beginne eine Diskussion unter + oder beginne eine Diskussion bei apps/client/src/app/pages/about/overview/about-overview-page.html 94 diff --git a/apps/client/src/main.ts b/apps/client/src/main.ts index f596de5f4..45901baec 100644 --- a/apps/client/src/main.ts +++ b/apps/client/src/main.ts @@ -1,5 +1,6 @@ import { InfoResponse } from '@ghostfolio/common/interfaces'; import { filterGlobalPermissions } from '@ghostfolio/common/permissions'; +import { registerChartConfiguration } from '@ghostfolio/ui/chart'; import { GF_ENVIRONMENT } from '@ghostfolio/ui/environment'; import { GfNotificationModule } from '@ghostfolio/ui/notifications'; @@ -58,6 +59,8 @@ import { environment } from './environments/environment'; enableProdMode(); } + registerChartConfiguration(); + await bootstrapApplication(GfAppComponent, { providers: [ authInterceptorProviders, diff --git a/apps/client/src/styles/theme.scss b/apps/client/src/styles/theme.scss index ef2fa397c..75ecc210d 100644 --- a/apps/client/src/styles/theme.scss +++ b/apps/client/src/styles/theme.scss @@ -312,7 +312,10 @@ $gf-typography: ( @include mat.checkbox-overrides( ( - selected-icon-color: var(--gf-theme-primary-500) + selected-focus-icon-color: var(--gf-theme-primary-500), + selected-hover-icon-color: var(--gf-theme-primary-500), + selected-icon-color: var(--gf-theme-primary-500), + selected-pressed-icon-color: var(--gf-theme-primary-500) ) ); diff --git a/libs/ui/src/lib/activities-table/activities-table.component.html b/libs/ui/src/lib/activities-table/activities-table.component.html index 1e57e8c7e..0041f5a14 100644 --- a/libs/ui/src/lib/activities-table/activities-table.component.html +++ b/libs/ui/src/lib/activities-table/activities-table.component.html @@ -161,13 +161,11 @@ Name -
-
- {{ element.SymbolProfile?.name }} - @if (element.isDraft) { - Draft - } -
+
+ {{ element.SymbolProfile?.name }} + @if (element.isDraft) { + Draft + }
@if ( element.SymbolProfile?.dataSource !== 'MANUAL' && diff --git a/libs/ui/src/lib/chart/chart.registry.ts b/libs/ui/src/lib/chart/chart.registry.ts index 465d6e716..a6a8b3e55 100644 --- a/libs/ui/src/lib/chart/chart.registry.ts +++ b/libs/ui/src/lib/chart/chart.registry.ts @@ -1,6 +1,7 @@ import { getTooltipPositionerMapTop } from '@ghostfolio/common/chart-helper'; -import { Tooltip, TooltipPositionerFunction, ChartType } from 'chart.js'; +import { Chart, Tooltip, TooltipPositionerFunction, ChartType } from 'chart.js'; +import annotationPlugin from 'chartjs-plugin-annotation'; interface VerticalHoverLinePluginOptions { color?: string; @@ -23,6 +24,10 @@ export function registerChartConfiguration() { return; } + // Register the annotation plugin early so that every chart is initialized + // with its state and does not crash on interaction + Chart.register(annotationPlugin); + Tooltip.positioners.top = function (_elements, eventPosition) { return getTooltipPositionerMapTop(this.chart, eventPosition); }; diff --git a/libs/ui/src/lib/portfolio-proportion-chart/interfaces/interfaces.ts b/libs/ui/src/lib/portfolio-proportion-chart/interfaces/interfaces.ts new file mode 100644 index 000000000..25d12b049 --- /dev/null +++ b/libs/ui/src/lib/portfolio-proportion-chart/interfaces/interfaces.ts @@ -0,0 +1,5 @@ +import { AssetProfileIdentifier } from '@ghostfolio/common/interfaces'; + +export type PortfolioProportionChartClickEvent = + | AssetProfileIdentifier + | { accountId: string }; diff --git a/libs/ui/src/lib/portfolio-proportion-chart/portfolio-proportion-chart.component.ts b/libs/ui/src/lib/portfolio-proportion-chart/portfolio-proportion-chart.component.ts index e2c41e956..bf6fd193e 100644 --- a/libs/ui/src/lib/portfolio-proportion-chart/portfolio-proportion-chart.component.ts +++ b/libs/ui/src/lib/portfolio-proportion-chart/portfolio-proportion-chart.component.ts @@ -1,10 +1,7 @@ import { getTooltipOptions } from '@ghostfolio/common/chart-helper'; import { UNKNOWN_KEY } from '@ghostfolio/common/config'; import { getLocale, getSum, getTextColor } from '@ghostfolio/common/helper'; -import { - AssetProfileIdentifier, - PortfolioPosition -} from '@ghostfolio/common/interfaces'; +import { PortfolioPosition } from '@ghostfolio/common/interfaces'; import { ColorScheme } from '@ghostfolio/common/types'; import { @@ -36,6 +33,8 @@ import Color from 'color'; import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader'; import OpenColor from 'open-color'; +import { PortfolioProportionChartClickEvent } from './interfaces/interfaces'; + const { blue, cyan, @@ -80,7 +79,8 @@ export class GfPortfolioProportionChartComponent public chart: Chart<'doughnut'>; public isLoading = true; - protected readonly proportionChartClicked = output(); + protected readonly proportionChartClicked = + output(); private readonly OTHER_KEY = 'OTHER'; @@ -355,11 +355,11 @@ export class GfPortfolioProportionChartComponent const dataIndex = activeElements[0].index; const symbol = chart.data.labels?.[dataIndex] as string; - const dataSource = this.data[symbol].dataSource; + const dataSource = this.data[symbol]?.dataSource; - if (dataSource) { - this.proportionChartClicked.emit({ dataSource, symbol }); - } + this.proportionChartClicked.emit( + dataSource ? { dataSource, symbol } : { accountId: symbol } + ); } catch {} }, onHover: (event, chartElement) => {