From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 120D592F47 for ; Thu, 23 Mar 2023 16:45:06 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 468972ECE7 for ; Thu, 23 Mar 2023 16:45:05 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Thu, 23 Mar 2023 16:45:00 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id E5CDE46602 for ; Thu, 23 Mar 2023 16:44:58 +0100 (CET) From: Stefan Sterz To: pmg-devel@lists.proxmox.com Date: Thu, 23 Mar 2023 16:44:55 +0100 Message-Id: <20230323154455.1458701-4-s.sterz@proxmox.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230323154455.1458701-1-s.sterz@proxmox.com> References: <20230323154455.1458701-1-s.sterz@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.058 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% 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 Subject: [pmg-devel] [PATCH pmg-gui 3/3] quarantines: use a check mark for the dark mode filter X-BeenThere: pmg-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Mail Gateway development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Mar 2023 15:45:06 -0000 ...instead of a toggle button. also adjusts the wording and adds a separator. Signed-off-by: Stefan Sterz --- js/AttachmentQuarantine.js | 12 ++++++++---- js/SpamQuarantine.js | 12 ++++++++---- js/VirusQuarantine.js | 12 ++++++++---- js/controller/QuarantineController.js | 12 +++++++----- 4 files changed, 31 insertions(+), 17 deletions(-) diff --git a/js/AttachmentQuarantine.js b/js/AttachmentQuarantine.js index 6e9e546..52bda4c 100644 --- a/js/AttachmentQuarantine.js +++ b/js/AttachmentQuarantine.js @@ -108,10 +108,14 @@ Ext.define('PMG.AttachmentQuarantine', { iconCls: 'fa fa-file-code-o', }, { - xtype: 'button', - reference: 'themeToggle', - text: gettext('Toggle Theme'), - enableToggle: true, + xtype: 'tbseparator', + reference: 'themeCheckSep', + }, + { + xtype: 'proxmoxcheckbox', + reference: 'themeCheck', + checked: true, + boxLabel: gettext('Dark-mode filter'), iconCls: 'fa fa-paint-brush', }, '->', diff --git a/js/SpamQuarantine.js b/js/SpamQuarantine.js index 093413d..a390dcf 100644 --- a/js/SpamQuarantine.js +++ b/js/SpamQuarantine.js @@ -225,10 +225,14 @@ Ext.define('PMG.SpamQuarantine', { iconCls: 'fa fa-bullhorn', }, { - xtype: 'button', - reference: 'themeToggle', - text: gettext('Toggle Theme'), - enableToggle: true, + xtype: 'tbseparator', + reference: 'themeCheckSep', + }, + { + xtype: 'proxmoxcheckbox', + reference: 'themeCheck', + checked: true, + boxLabel: gettext('Dark-mode filter'), iconCls: 'fa fa-paint-brush', }, '->', diff --git a/js/VirusQuarantine.js b/js/VirusQuarantine.js index 08bd7d9..9e5a4fb 100644 --- a/js/VirusQuarantine.js +++ b/js/VirusQuarantine.js @@ -121,10 +121,14 @@ Ext.define('PMG.VirusQuarantine', { iconCls: 'fa fa-file-code-o', }, { - xtype: 'button', - reference: 'themeToggle', - text: gettext('Toggle Theme'), - enableToggle: true, + xtype: 'tbseparator', + reference: 'themeCheckSep', + }, + { + xtype: 'proxmoxcheckbox', + reference: 'themeCheck', + checked: true, + boxLabel: gettext('Dark-mode filter'), iconCls: 'fa fa-paint-brush', }, '->', diff --git a/js/controller/QuarantineController.js b/js/controller/QuarantineController.js index 3135e2b..2a24389 100644 --- a/js/controller/QuarantineController.js +++ b/js/controller/QuarantineController.js @@ -46,21 +46,23 @@ Ext.define('PMG.controller.QuarantineController', { hideThemeToggle: function(argument) { let me = this; - let themeButton = me.lookup("themeToggle"); + let themeButton = me.lookup('themeCheck'); themeButton.disable(); themeButton.hide(); + me.lookup('themeCheckSep').hide(); me.themed = true; me.toggleTheme(); }, showThemeToggle: function(argument) { let me = this; - let themeButton = me.lookup("themeToggle"); + let themeButton = me.lookup('themeCheck'); me.themed = false; me.toggleTheme(); - themeButton.setPressed(true); + themeButton.setValue(true); themeButton.enable(); themeButton.show(); + me.lookup('themeCheckSep').show(); }, toggleRaw: function(button) { @@ -226,8 +228,8 @@ Ext.define('PMG.controller.QuarantineController', { 'button[reference=raw]': { click: 'toggleRaw', }, - 'button[reference=themeToggle]': { - click: 'toggleTheme', + 'proxmoxcheckbox[reference=themeCheck]': { + change: 'toggleTheme', }, 'pmgQuarantineList': { selectionChange: 'onSelectMail', -- 2.30.2