Skip to content

A community-supported supercharged document management system: scan, index and archive all your documents

Dismiss all

Michael Shamoon532a3d955ccb
diff --git a/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.html b/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.html
index b4c4fc01b..d00114934 100644
--- a/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.html
+++ b/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.html
@@ -1,5 +1,13 @@
-<app-widget-frame title="Upload new documents" i18n-title>
-
+<app-widget-frame title="Upload new documents" i18n-title [class.has-multiple-status]="getStatus().length > 1">
+ <div header-buttons>
+ <button type="button" class="btn btn-link dismiss-all" [disabled]="!getStatus().length" (click)="dismissAll()">
+ <small class="mr-1">Hide all</small>
+ <svg xmlns="http://www.w3.org/2000/svg" width="1rem" height="1rem" fill="currentColor" class="bi bi-check2-all" viewBox="0 0 16 16">
+ <path d="M12.354 4.354a.5.5 0 0 0-.708-.708L5 10.293 1.854 7.146a.5.5 0 1 0-.708.708l3.5 3.5a.5.5 0 0 0 .708 0l7-7zm-4.208 7l-.896-.897.707-.707.543.543 6.646-6.647a.5.5 0 0 1 .708.708l-7 7a.5.5 0 0 1-.708 0z"/>
+ <path d="M5.354 7.146l.896.897-.707.707-.897-.896a.5.5 0 1 1 .708-.708z"/>
+ </svg>
+ </button>
+ </div>
<div content>
<form>
<ngx-file-drop dropZoneLabel="Drop documents here or" browseBtnLabel="Browse files" (onFileDrop)="dropped($event)"
diff --git a/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.scss b/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.scss
index 807eac66b..10a83e308 100644
--- a/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.scss
+++ b/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.scss
@@ -21,6 +21,15 @@ form {
line-height: 1;
}
+.dismiss-all {
+ transition: opacity 0.2s ease;
+ opacity: 0;
+}
+
+.has-multiple-status .dismiss-all {
+ opacity: 1;
+}
+
::ng-deep .progress {
position: absolute;
top: 0;
diff --git a/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.ts b/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.ts
index e9a62cf9c..19ab8d04b 100644
--- a/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.ts
+++ b/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.ts
@@ -57,6 +57,10 @@ export class UploadFileWidgetComponent implements OnInit {
this.consumerStatusService.dismiss(status)
}
+ dismissAll() {
+ this.consumerStatusService.dismissAll()
+ }
+
ngOnInit(): void {
}
diff --git a/src-ui/src/app/services/consumer-status.service.ts b/src-ui/src/app/services/consumer-status.service.ts
index d5ac1ba47..b2804103d 100644
--- a/src-ui/src/app/services/consumer-status.service.ts
+++ b/src-ui/src/app/services/consumer-status.service.ts
@@ -133,6 +133,10 @@ export class ConsumerStatusService {
}
}
+ dismissAll() {
+ this.consumerStatus = []
+ }
+
onDocumentConsumptionFinished() {
return this.documentConsumptionFinishedSubject
}