diff --git a/CHANGELOG.md b/CHANGELOG.md index 2bfcf526a..a71397b2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,12 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased -### Added - -- Improved the usability of the user account registration - ### Changed +- Improved the usability of the user account registration +- Improved the usability of the _Copy AI prompt to clipboard_ actions on the analysis page (experimental) - Improved the language localization for German (`de`) - Upgraded `angular` from version `19.0.5` to `19.2.1` - Upgraded `Nx` from version `20.3.2` to `20.5.0` diff --git a/apps/client/src/app/components/header/header.component.html b/apps/client/src/app/components/header/header.component.html index 8a611d935..680cc98f0 100644 --- a/apps/client/src/app/components/header/header.component.html +++ b/apps/client/src/app/components/header/header.component.html @@ -134,7 +134,7 @@ ; public benchmarkDataItems: HistoricalDataItem[] = []; public benchmarks: Partial[]; @@ -46,10 +55,12 @@ export class AnalysisPageComponent implements OnDestroy, OnInit { public investments: InvestmentItem[]; public investmentTimelineDataLabel = $localize`Investment`; public investmentsByGroup: InvestmentItem[]; + public isLoadingAnalysisPrompt: boolean; public isLoadingBenchmarkComparator: boolean; public isLoadingDividendTimelineChart: boolean; public isLoadingInvestmentChart: boolean; public isLoadingInvestmentTimelineChart: boolean; + public isLoadingPortfolioPrompt: boolean; public mode: GroupBy = 'month'; public modeOptions: ToggleOption[] = [ { label: $localize`Monthly`, value: 'month' }, @@ -143,6 +154,12 @@ export class AnalysisPageComponent implements OnDestroy, OnInit { } public onCopyPromptToClipboard(mode: AiPromptMode) { + if (mode === 'analysis') { + this.isLoadingAnalysisPrompt = true; + } else if (mode === 'portfolio') { + this.isLoadingPortfolioPrompt = true; + } + this.dataService .fetchPrompt(mode) .pipe(takeUntil(this.unsubscribeSubject)) @@ -163,6 +180,14 @@ export class AnalysisPageComponent implements OnDestroy, OnInit { .subscribe(() => { window.open('https://duck.ai', '_blank'); }); + + this.actionsMenuButton.closeMenu(); + + if (mode === 'analysis') { + this.isLoadingAnalysisPrompt = false; + } else if (mode === 'portfolio') { + this.isLoadingPortfolioPrompt = false; + } }); } diff --git a/apps/client/src/app/pages/portfolio/analysis/analysis-page.html b/apps/client/src/app/pages/portfolio/analysis/analysis-page.html index 84ca54e06..56c95e40f 100644 --- a/apps/client/src/app/pages/portfolio/analysis/analysis-page.html +++ b/apps/client/src/app/pages/portfolio/analysis/analysis-page.html @@ -5,6 +5,7 @@
- - - + +
+ + +
diff --git a/apps/client/src/app/pages/portfolio/analysis/analysis-page.module.ts b/apps/client/src/app/pages/portfolio/analysis/analysis-page.module.ts index fb39b2ab9..e02e15ec8 100644 --- a/apps/client/src/app/pages/portfolio/analysis/analysis-page.module.ts +++ b/apps/client/src/app/pages/portfolio/analysis/analysis-page.module.ts @@ -10,6 +10,7 @@ import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core'; import { MatButtonModule } from '@angular/material/button'; import { MatCardModule } from '@angular/material/card'; import { MatMenuModule } from '@angular/material/menu'; +import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader'; import { AnalysisPageRoutingModule } from './analysis-page-routing.module'; @@ -29,6 +30,7 @@ import { AnalysisPageComponent } from './analysis-page.component'; MatButtonModule, MatCardModule, MatMenuModule, + MatProgressSpinnerModule, NgxSkeletonLoaderModule ], schemas: [CUSTOM_ELEMENTS_SCHEMA] diff --git a/apps/client/src/styles.scss b/apps/client/src/styles.scss index b13b088b7..b4723d377 100644 --- a/apps/client/src/styles.scss +++ b/apps/client/src/styles.scss @@ -451,7 +451,7 @@ ngx-skeleton-loader { } .mat-mdc-menu-panel { - &.assistant { + &.no-max-width { max-width: unset !important; .mat-mdc-menu-content {