Browse Source
Merge branch 'main' into feature/upgrade-bootstrap-to-version-5
pull/8131/head
Thomas Kaul
2 days ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with
18 additions and
6 deletions
CHANGELOG.md
apps/client/src/app/components/user-account-settings/user-account-settings.html
apps/client/src/app/directives/file-drop/file-drop.directive.ts
apps/client/src/app/pages/portfolio/activities/import-activities-dialog/import-activities-dialog.component.ts
apps/client/src/app/pages/portfolio/activities/import-activities-dialog/import-activities-dialog.html
@ -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
### Changed
- Upgraded `bootstrap` from version `4.6.2` to `5.3.8`
@ -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" >
@ -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 ) ;
}
}
}
@ -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 ;
}
@ -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"