mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-14 02:27:06 +01:00
Mail rule edit dialog
This commit is contained in:
parent
6f25917c86
commit
9231df7a4a
9 changed files with 239 additions and 7 deletions
|
|
@ -9,6 +9,20 @@ export enum MailFilterAttachmentType {
|
|||
Everything = 2,
|
||||
}
|
||||
|
||||
export const MailFilterAttachmentTypeOptions: Array<{
|
||||
id: number
|
||||
name: string
|
||||
}> = [
|
||||
{
|
||||
id: MailFilterAttachmentType.Attachments,
|
||||
name: $localize`Only process attachments.`,
|
||||
},
|
||||
{
|
||||
id: MailFilterAttachmentType.Everything,
|
||||
name: $localize`Process all files, including 'inline' attachments.`,
|
||||
},
|
||||
]
|
||||
|
||||
export enum MailAction {
|
||||
Delete = 1,
|
||||
Move = 2,
|
||||
|
|
@ -17,11 +31,42 @@ export enum MailAction {
|
|||
Tag = 5,
|
||||
}
|
||||
|
||||
export const MailActionOptions: Array<{ id: number; name: string }> = [
|
||||
{ id: MailAction.Delete, name: $localize`Delete` },
|
||||
{ id: MailAction.Move, name: $localize`Move to specified folder` },
|
||||
{
|
||||
id: MailAction.MarkRead,
|
||||
name: $localize`Mark as read, don't process read mails`,
|
||||
},
|
||||
{
|
||||
id: MailAction.Flag,
|
||||
name: $localize`Flag the mail, don't process flagged mails`,
|
||||
},
|
||||
{
|
||||
id: MailAction.Tag,
|
||||
name: $localize`Tag the mail with specified tag, don't process tagged mails`,
|
||||
},
|
||||
]
|
||||
|
||||
export enum MailMetadataTitleOption {
|
||||
FromSubject = 1,
|
||||
FromFilename = 2,
|
||||
}
|
||||
|
||||
export const MailMetadataTitleOptionOptions: Array<{
|
||||
id: number
|
||||
name: string
|
||||
}> = [
|
||||
{
|
||||
id: MailMetadataTitleOption.FromSubject,
|
||||
name: $localize`Use subject as title`,
|
||||
},
|
||||
{
|
||||
id: MailMetadataTitleOption.FromFilename,
|
||||
name: $localize`Use attachment filename as title`,
|
||||
},
|
||||
]
|
||||
|
||||
export enum MailMetadataCorrespondentOption {
|
||||
FromNothing = 1,
|
||||
FromEmail = 2,
|
||||
|
|
@ -29,6 +74,28 @@ export enum MailMetadataCorrespondentOption {
|
|||
FromCustom = 4,
|
||||
}
|
||||
|
||||
export const MailMetadataCorrespondentOptionOptions: Array<{
|
||||
id: number
|
||||
name: string
|
||||
}> = [
|
||||
{
|
||||
id: MailMetadataCorrespondentOption.FromNothing,
|
||||
name: $localize`Do not assign a correspondent`,
|
||||
},
|
||||
{
|
||||
id: MailMetadataCorrespondentOption.FromEmail,
|
||||
name: $localize`Use mail address`,
|
||||
},
|
||||
{
|
||||
id: MailMetadataCorrespondentOption.FromName,
|
||||
name: $localize`Use name (or mail address if not available)`,
|
||||
},
|
||||
{
|
||||
id: MailMetadataCorrespondentOption.FromCustom,
|
||||
name: $localize`Use correspondent selected below`,
|
||||
},
|
||||
]
|
||||
|
||||
export interface PaperlessMailRule extends ObjectWithId {
|
||||
name: string
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue