[pmg-devel] [RFC PATCH pmg-gui 1/1] quarantine content: add checkbox for controlling image loading
Mira Limbeck
m.limbeck at proxmox.com
Wed Feb 21 15:17:26 CET 2024
On 2/13/24 12:30, Dominik Csapak wrote:
> sometimes users don't want to load the images from the quarantine,
> even when the admin configured 'viewimages' to on in the config.
> (e.g. for privacy reasons)
>
> This checkbox sets/gets the state from the browser local storage
> (so it's saved across reloads) to save the users preference of loading
> images.
>
> If the backend is set to not load the images, the checkbox doesn't have
> any effect.
>
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
> js/AttachmentQuarantine.js | 4 +++-
> js/Makefile | 1 +
> js/SpamQuarantine.js | 4 +++-
> js/VirusQuarantine.js | 4 +++-
> js/controller/QuarantineController.js | 19 ++++++++++++++++---
> js/form/ViewImages.js | 17 +++++++++++++++++
> 6 files changed, 43 insertions(+), 6 deletions(-)
> create mode 100644 js/form/ViewImages.js
>
I'd prefer a button similar to the `Toggle Raw` and `Toggle Spam Info`
ones that is off by default and only visible when there are images in
the mail, but that's personal taste.
Since we don't have any info on if there are even images in the mail,
the checkbox seems to be the better option.
Having it on by default doesn't change the behavior after applying the
patch, so seems to be the better option in this case.
Consider this patch:
Tested-by: Mira Limbeck <m.limbeck at proxmox.com>
More information about the pmg-devel
mailing list