Browse Source

Merge branch 'main' into bugfix/link-of-manage-asset-profile-button-in-holding-detail-dialog

pull/8151/head
Thomas Kaul 2 days ago
committed by GitHub
parent
commit
bedbe84642
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      CHANGELOG.md
  2. 2
      apps/client/src/app/components/user-account-settings/user-account-settings.html
  3. 10
      apps/client/src/app/directives/file-drop/file-drop.directive.ts
  4. 4
      apps/client/src/app/pages/portfolio/activities/import-activities-dialog/import-activities-dialog.component.ts
  5. 4
      apps/client/src/app/pages/portfolio/activities/import-activities-dialog/import-activities-dialog.html

4
CHANGELOG.md

@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased
### Added
- Added support to paste a file in the import activities dialog
### Fixed
- Fixed the link of the _Manage Asset Profile_ button in the holding detail dialog before the holding has loaded

2
apps/client/src/app/components/user-account-settings/user-account-settings.html

@ -295,7 +295,7 @@
<div class="pr-1 w-50">
<div>Ghostfolio AI</div>
<div class="hint-text text-muted" i18n>
Data processing by a third-party AI provider
Powered by third-party AI providers
</div>
</div>
<div class="pl-1 w-50">

10
apps/client/src/app/directives/file-drop/file-drop.directive.ts

@ -2,6 +2,7 @@ import { Directive, output } from '@angular/core';
@Directive({
host: {
'(document:paste)': 'onPaste($event)',
'(dragenter)': 'onDragEnter($event)',
'(dragover)': 'onDragOver($event)',
'(drop)': 'onDrop($event)'
@ -31,4 +32,13 @@ export class GfFileDropDirective {
this.filesDropped.emit(event.dataTransfer.files);
}
}
public onPaste(event: ClipboardEvent) {
const files = event.clipboardData?.files;
if (files?.length) {
event.preventDefault();
this.filesDropped.emit(files);
}
}
}

4
apps/client/src/app/pages/portfolio/activities/import-activities-dialog/import-activities-dialog.component.ts

@ -123,7 +123,7 @@ export class GfImportActivitiesDialogComponent {
protected details: any[] = [];
protected dialogTitle = $localize`Import Activities`;
protected errorMessages: string[] = [];
protected readonly ghostfolioAiTooltip = $localize`The content of your file will be processed by a third-party AI provider. Please remove any personal data before uploading.`;
protected readonly ghostfolioAiTooltip = $localize`The content of your file will be processed by third-party AI providers. Please remove any personal data before uploading.`;
protected readonly hasPermissionToEnableGhostfolioAi = hasPermission(
this.data.user?.permissions,
@ -259,7 +259,7 @@ export class GfImportActivitiesDialogComponent {
files: FileList;
stepper: MatStepper;
}) {
if (files.length === 0) {
if (files.length === 0 || this.importStep !== ImportStep.UPLOAD_FILE) {
return;
}

4
apps/client/src/app/pages/portfolio/activities/import-activities-dialog/import-activities-dialog.html

@ -134,9 +134,7 @@
[disabled]="isLoading"
(change)="onGhostfolioAiChange($event)"
>
<ng-container i18n
>Smart import with Ghostfolio AI</ng-container
>
<ng-container i18n>AI-assisted import</ng-container>
</mat-checkbox>
<span
class="align-items-center d-flex"

Loading…
Cancel
Save