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 1156F1FF56B for ; Mon, 22 Apr 2024 12:28:11 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id B263FE554; Mon, 22 Apr 2024 12:28:09 +0200 (CEST) From: Markus Frank To: pve-devel@lists.proxmox.com Date: Mon, 22 Apr 2024 12:27:56 +0200 Message-Id: <20240422102756.724874-2-m.frank@proxmox.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240422102756.724874-1-m.frank@proxmox.com> References: <20240422102756.724874-1-m.frank@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.031 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 Subject: [pve-devel] [PATCH manager v17 2/2] ui: qemu: add clipboard ComboBox as a advanced option in DisplayEdit X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" For SPICE and VNC, a different message is displayed. The backend code for the clipboard option can be found in the 'config: enable vnc clipboard parameter in vga_fmt'-commit in qemu-server. Signed-off-by: Markus Frank --- v17: * added "value: '__default__'" to clipboard ComboBox so that reset does not clear this field. * "(SPICE)" has been removed from the default field, as it is likely to confuse the user. www/manager6/qemu/DisplayEdit.js | 41 ++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/www/manager6/qemu/DisplayEdit.js b/www/manager6/qemu/DisplayEdit.js index f2649c1c..7acc25d6 100644 --- a/www/manager6/qemu/DisplayEdit.js +++ b/www/manager6/qemu/DisplayEdit.js @@ -35,6 +35,9 @@ Ext.define('PVE.qemu.DisplayInputPanel', { return Proxmox.Utils.defaultText; } }, + isVNC: get => get('clipboard') === 'vnc', + hideDefaultHint: get => get('isVNC') || get('matchNonGUIOption'), + hideVNCHint: get => !get('isVNC') || get('matchNonGUIOption'), }, }, @@ -71,6 +74,44 @@ Ext.define('PVE.qemu.DisplayInputPanel', { disabled: '{matchNonGUIOption}', }, }], + + advancedItems: [ + { + xtype: 'proxmoxKVComboBox', + name: 'clipboard', + deleteEmpty: false, + value: '__default__', + fieldLabel: gettext('Clipboard'), + comboItems: [ + ['__default__', Proxmox.Utils.defaultText], + ['vnc', 'VNC'], + ], + bind: { + value: '{clipboard}', + disabled: '{matchNonGUIOption}', + }, + }, + { + xtype: 'displayfield', + name: 'vncHint', + userCls: 'pmx-hint', + value: gettext('You cannot use the default SPICE clipboard if the VNC Clipboard is selected.') + ' ' + + gettext('VNC Clipboard requires spice-tools installed in the Guest-VM.'), + bind: { + hidden: '{hideVNCHint}', + }, + }, + { + xtype: 'displayfield', + name: 'defaultHint', + userCls: 'pmx-hint', + value: gettext('This option depends on your display type.') + ' ' + + gettext('If the display type uses SPICE you are able to use the default SPICE Clipboard.'), + bind: { + hidden: '{hideDefaultHint}', + }, + }, + ], }); Ext.define('PVE.qemu.DisplayEdit', { -- 2.39.2 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel