Commit Graph

22 Commits

Author SHA1 Message Date
Stefan Sterz
e950ec7202 quarantines: use a check mark for the dark mode filter
...instead of a toggle button. also adjusts the wording and adds a
separator.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
2023-03-23 17:19:12 +01:00
Stefan Sterz
9bcb553cfb quarantines: add support for a theme toggle
this allows toggling the presentation of the email previews depending
on the current theme. in the default "light" mode the toggle is hidden
to avoid clutter. enable the toggle in other themes to allow switching
back to the original way the email was rendered.

this requires a bump of the widget toolkit. the toolkit provides the
styles necessary for the toggle to work.

Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by:  Dominik Csapak <d.csapak@proxmox.com>
2023-03-15 15:38:54 +01:00
Dominik Csapak
c03e51ed3a fix #3287: add recipient filter for virus & attachment quarantines
So that users can filter these quarantine views, e.g. useful if they
have many mails there.

Replaced the emailSelection config with a quarantineType configs
since we want to have different behaviour for different quaratine
types. E.g., we want to show 'all' mails by default for the
virus/attachment quarantine, but not for the spam one.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-11-25 13:31:19 +01:00
Thomas Lamprecht
38229fc877 quarantines: dock attachement grid to bottom, avoid toggle button
A separate header and docked at the bottom reduces crowding at the
top and make the whole view(s) a bit clearer.

This also better mirrors where most mail clients show attachments
(e.g., thunderbird) and allows to avoid the extra button (UX benefits
most of the time from reduced inputs, if it doesn't takes away
features).

Make the panel collapsible for the spam and virus quarantine, and
hide the download button there; note that this isn't done for
security purpose but just wasn't requested and some users may do
better if they only decide deliver/delete here and let their MUA
handle attachements.

Disable collapsing in the Attachement quarantine, it doesn't really
makes sense there and we got a maxHeight already anyway.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-07 13:16:51 +01:00
Thomas Lamprecht
ecab0d0e3e attachement grid: set configs used on all use-sites as defaults
avoid overly repetition, we can still override them if we get a use
site that really requires different values here.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-07 09:46:31 +01:00
Dominik Csapak
991d5ec23d fix #2533: quarantine: add overflowHandler to the preview panel
so that the menu can be used even on narrower screens

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-11-07 09:46:31 +01:00
Dominik Csapak
c7a679755e quarantine controller: drop specialized classes, check at runtime instead
By making use of the optional chaining operator, we don't need to
override the 'onSelectMail' in both the attachment quarantine and the
spam quarantine. Instead, we opportunistically call lookup(id)?.setID
in the common handler for both, the attachments and the spaminfo
references.

As that was the single change from the parent class we can now drop
the specialized controller classes.

While at it, remove the stray 'xtype' property of the quarantine
controller, which make only sense for component derived classes.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
 [T: fix typos and reword message a bit]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-11-05 16:33:28 +01:00
Stoiko Ivanov
8fb8931b63 quarantine: use new controller for virus and attachment quarantines
fixes #1674 (the comment about multiselect for the virus quarantine)
fixes #3947 (multiselect for attachment quarantine)

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2022-10-28 11:30:23 +02:00
Thomas Lamprecht
365f84c19b quarantines: color code deliver and delete buttons
In some languages, e.g. widely used English, "Delete" and "Deliver"
are looking rather similar without too much eye squinting required.

Add an accent on their icons using for, at least in the western
hemisphere, the respective associated color, like red for trash can.
To 1) avoid to much messing with those cultures that got it switched
and 2) some more common color blindness use blue for the delivery
button, just to make it stand out.

Keep the white/black list as is, as such accents work best if not
everything uses them, i.e., so that they more common options actually
stand out.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-10-22 16:16:41 +02:00
Thomas Lamprecht
2cc13fbc8a quarantine grids: use arrow function for size renderer
quicker to read and avoids "violating" style guide due to on-line
normal functions

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-10-22 16:14:23 +02:00
Thomas Lamprecht
cd15075876 quarantine: subject/sender: refactor/code-style-fix render functions
extends on the improvements from the previous commit, reduces code
lines while (hopefully, as slightly subjective) not reducing
readability

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-10-22 16:12:25 +02:00
Stoiko Ivanov
ab606ffb7f fix #4137: display receiver in attachment/virus quarantine
the attachment and virus quarantines contain all quarantined mail for
all recipients - so we should display which mail is being
delivered/deleted - mostly if a mail is sent to multiple addresses
served by the same PMG.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2022-10-21 09:28:21 +02:00
Dominik Csapak
60a9d6fdbc {Attachment, Spam, Virus}Quarantine: fix layout for iframe
in extjs 7.0 the css changed slightly so that we need to define
the 'fit' layout explicitely to maintain the full width/height

otherwise it can happen that the iframe gets cut off

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2021-06-08 13:13:54 +00:00
Stoiko Ivanov
61c1d4d5b9 attachmentquarantine: fix missing '&' for raw-param addition
small glitch introduced in the code cleanup in:
0e26e20aa5

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
2021-05-11 16:17:05 +02:00
Thomas Lamprecht
0e26e20aa5 code cleanup
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-04-01 13:38:49 +02:00
Thomas Lamprecht
f057ca9085 drop jslint hints
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-10-23 14:08:50 +02:00
Thomas Lamprecht
a36756b058 drop jslint hint for Proxmox global
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-10-23 14:03:17 +02:00
Thomas Lamprecht
c87d46fbe8 tree wide: eslint --fix
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-10-23 13:17:15 +02:00
Dominik Csapak
72d8403cb6 Quarantine: set mailinfo visible only on html preview
We did already hide it when toggling raw/html, but when choosing raw
and changing the mail, it was again set to visible.
This patch fixes that by always taking 'me.raw' into account.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-04-15 14:06:43 +02:00
Thomas Lamprecht
4935e8fb22 qurantine: hide mailinfo in raw mode
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-04-15 12:59:38 +02:00
Dominik Csapak
ac6c1fb818 fix #2676: add MailInfo box on Quarantine Views
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2020-04-14 15:00:33 +02:00
Dominik Csapak
0023ef6ab2 add Attachment Quarantine
the Quarantine part is mostly copied from VirusQuarantine and adapted
the AttachmentGrid is inspired by the SpamScore list

this adds a new quarantine type 'Attachment' in the gui, where the admins
can review and control the mails in the attachment quarantine

it also shows a list of attachment/parts and a link where they can
be downloaded (in case the admin want to only forward a single
attachment or review the file in detail)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-By: Stoiko Ivanov <s.ivanov@proxmox.com>
Tested-By: Stoiko Ivanov <s.ivanov@proxmox.com>
2019-10-17 15:25:31 +02:00