From 98cdf614a576618a96035ff7dcc93849199ea52d Mon Sep 17 00:00:00 2001 From: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Wed, 9 Nov 2022 19:59:35 -0800 Subject: [PATCH] Mail form tweaks Include add button Include add button --- .../mail-account-edit-dialog.component.ts | 7 +- .../mail-rule-edit-dialog.component.html | 15 ++-- .../mail-rule-edit-dialog.component.ts | 75 +++++++++++++++++-- .../common/input/number/number.component.html | 2 +- .../common/input/number/number.component.ts | 5 +- .../manage/settings/settings.component.html | 49 +++++++----- .../manage/settings/settings.component.ts | 4 +- src-ui/src/app/data/paperless-mail-account.ts | 6 -- src-ui/src/app/data/paperless-mail-rule.ts | 71 ------------------ 9 files changed, 116 insertions(+), 118 deletions(-) diff --git a/src-ui/src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.ts b/src-ui/src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.ts index f4d395b03..98c897c89 100644 --- a/src-ui/src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.ts +++ b/src-ui/src/app/components/common/edit-dialog/mail-account-edit-dialog/mail-account-edit-dialog.component.ts @@ -4,7 +4,6 @@ import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap' import { EditDialogComponent } from 'src/app/components/common/edit-dialog/edit-dialog.component' import { IMAPSecurity, - IMAPSecurityLabels, PaperlessMailAccount, } from 'src/app/data/paperless-mail-account' import { MailAccountService } from 'src/app/services/rest/mail-account.service' @@ -40,6 +39,10 @@ export class MailAccountEditDialogComponent extends EditDialogComponent - - + +
+

Paperless will only process mails that match all of the filters specified below.

- - - +
+ + - + - +
diff --git a/src-ui/src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts b/src-ui/src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts index d820e3d5d..b2d84d642 100644 --- a/src-ui/src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts +++ b/src-ui/src/app/components/common/edit-dialog/mail-rule-edit-dialog/mail-rule-edit-dialog.component.ts @@ -8,13 +8,9 @@ import { PaperlessDocumentType } from 'src/app/data/paperless-document-type' import { PaperlessMailAccount } from 'src/app/data/paperless-mail-account' import { MailAction, - MailActionOptions, MailFilterAttachmentType, - MailFilterAttachmentTypeOptions, MailMetadataCorrespondentOption, - MailMetadataCorrespondentOptionOptions, MailMetadataTitleOption, - MailMetadataTitleOptionOptions, PaperlessMailRule, } from 'src/app/data/paperless-mail-rule' import { CorrespondentService } from 'src/app/services/rest/correspondent.service' @@ -89,19 +85,82 @@ export class MailRuleEditDialogComponent extends EditDialogComponent{{title}}
- +
{{error}} diff --git a/src-ui/src/app/components/common/input/number/number.component.ts b/src-ui/src/app/components/common/input/number/number.component.ts index cb29ff5e5..5ed861b5a 100644 --- a/src-ui/src/app/components/common/input/number/number.component.ts +++ b/src-ui/src/app/components/common/input/number/number.component.ts @@ -1,4 +1,4 @@ -import { Component, forwardRef } from '@angular/core' +import { Component, forwardRef, Input } from '@angular/core' import { NG_VALUE_ACCESSOR } from '@angular/forms' import { FILTER_ASN_ISNULL } from 'src/app/data/filter-rule-type' import { DocumentService } from 'src/app/services/rest/document.service' @@ -17,6 +17,9 @@ import { AbstractInputComponent } from '../abstract-input' styleUrls: ['./number.component.scss'], }) export class NumberComponent extends AbstractInputComponent { + @Input() + showAdd: boolean = true + constructor(private documentService: DocumentService) { super() } diff --git a/src-ui/src/app/components/manage/settings/settings.component.html b/src-ui/src/app/components/manage/settings/settings.component.html index 0aec87033..1f0ada8ab 100644 --- a/src-ui/src/app/components/manage/settings/settings.component.html +++ b/src-ui/src/app/components/manage/settings/settings.component.html @@ -221,8 +221,12 @@ Paperless Mail -

Mail accounts

-
    + +

    + Mail accounts + +

    +
    • @@ -232,14 +236,15 @@
    • -
    • -
      -
      -
      {{account.imap_server}}
      -
      -
      - - +
    • +
      +
      +
      {{account.imap_server}}
      +
      +
      + + +
@@ -248,8 +253,11 @@
No mail accounts defined.
-

Mail rules

-