From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id D7C591FF13B for ; Mon, 08 Jun 2026 14:17:29 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 263721BB43; Mon, 8 Jun 2026 14:17:29 +0200 (CEST) From: Dominik Csapak To: pmg-devel@lists.proxmox.com Subject: [PATCH pmg-gui] spam quarantine: reorganize buttons Date: Mon, 8 Jun 2026 14:16:42 +0200 Message-ID: <20260608121725.2417034-1-d.csapak@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.049 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: NYVQXOCCPGCKFKKXWGKE6DST2FBCI23Y X-Message-ID-Hash: NYVQXOCCPGCKFKKXWGKE6DST2FBCI23Y X-MailFrom: d.csapak@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Mail Gateway development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Since the number of buttons is rather large now, move the 'non-essential' actions into a 'More' menu. With this, there less often the need for it to be scrollable. Since the download button handled the download via the 'href' and 'download' attribute, this needs to be adapted to a proper handler and handle it like we downloads in other places. Since the other quarantine views don't have that many buttons (no welcomelist/blacklist/seen) leave them as is for now. Signed-off-by: Dominik Csapak --- If desired, i can of course do the same for the virus/attachment quar, but there would be only the 'download' button in the more menu, I don't think that makes sense... js/SpamQuarantine.js | 50 +++++++++++++-------------- js/controller/QuarantineController.js | 12 +++++++ 2 files changed, 36 insertions(+), 26 deletions(-) diff --git a/js/SpamQuarantine.js b/js/SpamQuarantine.js index 94998a9..a9a6931 100644 --- a/js/SpamQuarantine.js +++ b/js/SpamQuarantine.js @@ -408,20 +408,6 @@ Ext.define('PMG.SpamQuarantine', { iconCls: 'fa fa-paint-brush', }, '->', - { - xtype: 'button', - reference: 'download', - text: gettext('Download'), - setDownload: function (id) { - this.el.dom.download = id + '.eml'; - }, - bind: { - href: '{downloadMailURL}', - download: '{mailid}', - }, - iconCls: 'fa fa-download', - }, - '-', { xtype: 'button', reference: 'markseen', @@ -430,18 +416,6 @@ Ext.define('PMG.SpamQuarantine', { iconCls: 'fa fa-eye', tooltip: gettext('Mark this mail as seen or unseen'), }, - { - reference: 'welcomelist', - text: gettext('Welcomelist'), - iconCls: 'fa fa-check', - handler: 'btnHandler', - }, - { - reference: 'blocklist', - text: gettext('Blocklist'), - iconCls: 'fa fa-times', - handler: 'btnHandler', - }, { reference: 'deliver', text: gettext('Deliver'), @@ -454,6 +428,30 @@ Ext.define('PMG.SpamQuarantine', { iconCls: 'fa fa-trash-o critical', handler: 'btnHandler', }, + { + text: gettext('More'), + iconCls: 'fa fa-bars', + menu: [ + { + reference: 'welcomelist', + text: gettext('Welcomelist'), + iconCls: 'fa fa-check', + handler: 'btnHandler', + }, + { + reference: 'blocklist', + text: gettext('Blocklist'), + iconCls: 'fa fa-times', + handler: 'btnHandler', + }, + { + reference: 'download', + text: gettext('Download'), + handler: 'downloadMail', + iconCls: 'fa fa-download', + }, + ], + }, ], }, { diff --git a/js/controller/QuarantineController.js b/js/controller/QuarantineController.js index 5697611..b8b38bd 100644 --- a/js/controller/QuarantineController.js +++ b/js/controller/QuarantineController.js @@ -99,6 +99,18 @@ Ext.define('PMG.controller.QuarantineController', { me.doAction(action, selected); }, + downloadMail: function () { + let me = this; + let vm = me.getViewModel(); + let element = document.createElement('a'); + element.setAttribute('href', vm.get('downloadMailURL')); + element.setAttribute('download', `${vm.get('mailid')}.eml`); + element.style.display = 'none'; + document.body.appendChild(element); + element.click(); + document.body.removeChild(element); + }, + doAction: function (action, selected) { if (!selected.length) { return; -- 2.47.3