public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH manager 2/2] ui: guest identity: use displayfield for uid
Date: Mon, 23 Nov 2026 17:36:06 +0100	[thread overview]
Message-ID: <20261123163615.519838-3-f.ebner@proxmox.com> (raw)
In-Reply-To: <20261123163615.519838-1-f.ebner@proxmox.com>

Textfields are usually editable and the uid cannot ever be edited. Use
a displayfield instead to avoid producing this wrong association. For
the default text, grey out the value by using a new user class with
opacity: 0.50 to immediately make it clear that it's not an actual
configuration value.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 www/css/ext6-pve.css                | 4 ++++
 www/manager6/panel/GuestIdentity.js | 7 +++----
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/www/css/ext6-pve.css b/www/css/ext6-pve.css
index 2416bc05..91415c46 100644
--- a/www/css/ext6-pve.css
+++ b/www/css/ext6-pve.css
@@ -701,6 +701,10 @@ table.osds td:first-of-type {
     color: #3892d4;
 }
 
+.pmx-opacity-50 {
+    opacity: 0.50;
+}
+
 .pmx-opacity-75 {
     opacity: 0.75;
 }
diff --git a/www/manager6/panel/GuestIdentity.js b/www/manager6/panel/GuestIdentity.js
index dbba0062..bb388c85 100644
--- a/www/manager6/panel/GuestIdentity.js
+++ b/www/manager6/panel/GuestIdentity.js
@@ -31,11 +31,10 @@ Ext.define('PVE.window.GuestIdentity', {
                 layout: 'hbox',
                 items: [
                     {
-                        xtype: 'textfield',
+                        xtype: 'displayfield',
                         itemId: 'uid',
-                        value: meta.uid ?? '',
-                        emptyText: gettext('Assigned with the next configuration change'),
-                        editable: false,
+                        value: meta.uid ?? gettext('Assigned with the next configuration change'),
+                        userCls: meta.uid ? '' : 'pmx-opacity-50',
                         flex: 1,
                     },
                     {
-- 
2.47.3





  parent reply	other threads:[~2026-11-23 16:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-23 16:36 [PATCH-SERIES manager 0/2] ui: guest identity: small improvements Fiona Ebner
2026-11-23 16:36 ` [PATCH manager 1/2] ui: guest identity: hide copy-to-clipboard button when there is no uid Fiona Ebner
2026-11-23 16:36 ` Fiona Ebner [this message]
2026-11-23 17:44 ` applied: [PATCH-SERIES manager 0/2] ui: guest identity: small improvements 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=20261123163615.519838-3-f.ebner@proxmox.com \
    --to=f.ebner@proxmox.com \
    --cc=pve-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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal