From: Dominik Csapak <d.csapak@proxmox.com>
To: pmg-devel@lists.proxmox.com
Subject: [PATCH pmg-gui] quarantine: improve button layout
Date: Tue, 9 Jun 2026 10:59:03 +0200 [thread overview]
Message-ID: <20260609085929.1160555-1-d.csapak@proxmox.com> (raw)
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 <t.lamprecht@proxmox.com>
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
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
next reply other threads:[~2026-06-09 9:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-09 8:59 Dominik Csapak [this message]
2026-06-09 16:27 ` applied: [PATCH pmg-gui] quarantine: improve button layout Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260609085929.1160555-1-d.csapak@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=pmg-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox