From a4c5d0429fa6cf0418d36d5916420231897d9037 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun, 24 Sep 2023 08:38:44 -0700 Subject: [PATCH] Disable dashbaord dnd if global dnd active --- src-ui/src/app/app.component.ts | 3 +++ src-ui/src/app/components/dashboard/dashboard.component.html | 1 + src-ui/src/app/components/dashboard/dashboard.component.ts | 5 ----- src-ui/src/app/services/settings.service.ts | 1 + 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src-ui/src/app/app.component.ts b/src-ui/src/app/app.component.ts index d0f893da6..329a7d7b3 100644 --- a/src-ui/src/app/app.component.ts +++ b/src-ui/src/app/app.component.ts @@ -262,6 +262,7 @@ export class AppComponent implements OnInit, OnDestroy { } public fileOver() { + this.settings.globalDropzoneActive = true // allows transition setTimeout(() => { this.fileIsOver = true @@ -272,6 +273,7 @@ export class AppComponent implements OnInit, OnDestroy { } public fileLeave(immediate: boolean = false) { + this.settings.globalDropzoneActive = false const ms = immediate ? 0 : 500 this.fileLeaveTimeoutID = setTimeout(() => { @@ -284,6 +286,7 @@ export class AppComponent implements OnInit, OnDestroy { } public dropped(files: NgxFileDropEntry[]) { + this.settings.globalDropzoneActive = false this.fileLeave(true) this.uploadDocumentsService.uploadFiles(files) this.toastService.showInfo($localize`Initiating upload...`, 3000) diff --git a/src-ui/src/app/components/dashboard/dashboard.component.html b/src-ui/src/app/components/dashboard/dashboard.component.html index 7b7116c15..a503e143d 100644 --- a/src-ui/src/app/components/dashboard/dashboard.component.html +++ b/src-ui/src/app/components/dashboard/dashboard.component.html @@ -6,6 +6,7 @@