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 672481FF146 for ; Tue, 09 Jun 2026 11:00:03 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 351D79543; Tue, 9 Jun 2026 11:00:03 +0200 (CEST) From: Dominik Csapak To: pmg-devel@lists.proxmox.com Subject: [PATCH pmg-gui] quarantine: improve button layout Date: Tue, 9 Jun 2026 10:59:03 +0200 Message-ID: <20260609085929.1160555-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: H4PKOSLLAMRNR6LUABG5MQO3IB72XCM2 X-Message-ID-Hash: H4PKOSLLAMRNR6LUABG5MQO3IB72XCM2 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: This is a semantical revert & rework of cc3df1b (spam quarantine: reorganize buttons) Instead of always showing a generic 'More' menu, optimize the button layout such that there should be enough space in most cases. Move welcomelist and blocklist as menu items to deliver and delete respectively (as split buttons). Also remove the text for the download button, this should be self-explanatory and saves quite some space. This is also done for the virus and attachment quarantine for consistencies sake. Suggested-by: Thomas Lamprecht Signed-off-by: Dominik Csapak --- js/AttachmentQuarantine.js | 1 - js/SpamQuarantine.js | 59 ++++++++++++++++----------- js/VirusQuarantine.js | 1 - js/controller/QuarantineController.js | 12 ------ 4 files changed, 35 insertions(+), 38 deletions(-) diff --git a/js/AttachmentQuarantine.js b/js/AttachmentQuarantine.js index ee0f2e6..a29fd84 100644 --- a/js/AttachmentQuarantine.js +++ b/js/AttachmentQuarantine.js @@ -132,7 +132,6 @@ Ext.define('PMG.AttachmentQuarantine', { { xtype: 'button', reference: 'download', - text: gettext('Download'), setDownload: function (id) { this.el.dom.download = id + '.eml'; }, diff --git a/js/SpamQuarantine.js b/js/SpamQuarantine.js index a9a6931..4be8f8e 100644 --- a/js/SpamQuarantine.js +++ b/js/SpamQuarantine.js @@ -408,6 +408,19 @@ Ext.define('PMG.SpamQuarantine', { iconCls: 'fa fa-paint-brush', }, '->', + { + xtype: 'button', + reference: 'download', + setDownload: function (id) { + this.el.dom.download = id + '.eml'; + }, + bind: { + href: '{downloadMailURL}', + download: '{mailid}', + }, + iconCls: 'fa fa-download', + }, + '-', { xtype: 'button', reference: 'markseen', @@ -417,40 +430,38 @@ Ext.define('PMG.SpamQuarantine', { tooltip: gettext('Mark this mail as seen or unseen'), }, { + xtype: 'splitbutton', reference: 'deliver', text: gettext('Deliver'), iconCls: 'fa fa-paper-plane-o info-blue', handler: 'btnHandler', + menu: { + items: [ + { + reference: 'welcomelist', + text: gettext('Welcomelist'), + iconCls: 'fa fa-check', + handler: 'btnHandler', + }, + ], + }, }, { + xtype: 'splitbutton', reference: 'delete', text: gettext('Delete'), 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', - }, - ], + menu: { + items: [ + { + reference: 'blocklist', + text: gettext('Blocklist'), + iconCls: 'fa fa-times', + handler: 'btnHandler', + }, + ], + }, }, ], }, diff --git a/js/VirusQuarantine.js b/js/VirusQuarantine.js index 6c64948..de65c56 100644 --- a/js/VirusQuarantine.js +++ b/js/VirusQuarantine.js @@ -155,7 +155,6 @@ Ext.define('PMG.VirusQuarantine', { { xtype: 'button', reference: 'download', - text: gettext('Download'), setDownload: function (id) { this.el.dom.download = id + '.eml'; }, diff --git a/js/controller/QuarantineController.js b/js/controller/QuarantineController.js index b8b38bd..5697611 100644 --- a/js/controller/QuarantineController.js +++ b/js/controller/QuarantineController.js @@ -99,18 +99,6 @@ 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