public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH-SERIES manager 0/2] ui: guest identity: small improvements
@ 2026-11-23 16:36 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
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Fiona Ebner @ 2026-11-23 16:36 UTC (permalink / raw)
  To: pve-devel

If there is no uid, hide the copy-to-clipboard button.

Use a displayfield for the uid.

pve-manager:

Fiona Ebner (2):
  ui: guest identity: hide copy-to-clipboard button when there is no uid
  ui: guest identity: use displayfield for uid

 www/css/ext6-pve.css                | 4 ++++
 www/manager6/panel/GuestIdentity.js | 8 ++++----
 2 files changed, 8 insertions(+), 4 deletions(-)


Summary over all repositories:
  2 files changed, 8 insertions(+), 4 deletions(-)

-- 
Generated by git-murpp 0.5.0




^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH manager 1/2] ui: guest identity: hide copy-to-clipboard button when there is no uid
  2026-11-23 16:36 [PATCH-SERIES manager 0/2] ui: guest identity: small improvements Fiona Ebner
@ 2026-11-23 16:36 ` Fiona Ebner
  2026-11-23 16:36 ` [PATCH manager 2/2] ui: guest identity: use displayfield for uid Fiona Ebner
  2026-11-23 17:44 ` applied: [PATCH-SERIES manager 0/2] ui: guest identity: small improvements Thomas Lamprecht
  2 siblings, 0 replies; 4+ messages in thread
From: Fiona Ebner @ 2026-11-23 16:36 UTC (permalink / raw)
  To: pve-devel

The button cannot be used for a window instance without a uid, so hide
it completely.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
 www/manager6/panel/GuestIdentity.js | 1 +
 1 file changed, 1 insertion(+)

diff --git a/www/manager6/panel/GuestIdentity.js b/www/manager6/panel/GuestIdentity.js
index 62c54d0f..dbba0062 100644
--- a/www/manager6/panel/GuestIdentity.js
+++ b/www/manager6/panel/GuestIdentity.js
@@ -44,6 +44,7 @@ Ext.define('PVE.window.GuestIdentity', {
                         tooltip: gettext('Copy to Clipboard'),
                         ariaLabel: gettext('Copy to Clipboard'),
                         disabled: !meta.uid,
+                        hidden: !meta.uid,
                         margin: '0 0 0 5',
                         handler: () => PVE.Utils.copyToClipboard(meta.uid),
                     },
-- 
2.47.3





^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH manager 2/2] ui: guest identity: use displayfield for uid
  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
  2026-11-23 17:44 ` applied: [PATCH-SERIES manager 0/2] ui: guest identity: small improvements Thomas Lamprecht
  2 siblings, 0 replies; 4+ messages in thread
From: Fiona Ebner @ 2026-11-23 16:36 UTC (permalink / raw)
  To: pve-devel

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





^ permalink raw reply related	[flat|nested] 4+ messages in thread

* applied: [PATCH-SERIES manager 0/2] ui: guest identity: small improvements
  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 ` [PATCH manager 2/2] ui: guest identity: use displayfield for uid Fiona Ebner
@ 2026-11-23 17:44 ` Thomas Lamprecht
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Lamprecht @ 2026-11-23 17:44 UTC (permalink / raw)
  To: pve-devel, Fiona Ebner

On Mon, 23 Nov 2026 17:36:04 +0100, Fiona Ebner wrote:
> If there is no uid, hide the copy-to-clipboard button.
> 
> Use a displayfield for the uid.
> 
> pve-manager:
> 
> Fiona Ebner (2):
>   ui: guest identity: hide copy-to-clipboard button when there is no uid
>   ui: guest identity: use displayfield for uid
> 
> [...]

Applied, thanks!

[1/2] ui: guest identity: hide copy-to-clipboard button when there is no uid
      https://git.proxmox.com/?p=pve-manager.git;a=commitdiff;h=f51bfb4a3cab5322f0869b090b0b7d16ad6d1190
[2/2] ui: guest identity: use displayfield for uid
      https://git.proxmox.com/?p=pve-manager.git;a=commitdiff;h=6a43cdf1a5c47916899817aa2a48bee4ad8f317b




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-11-23 17:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH manager 2/2] ui: guest identity: use displayfield for uid Fiona Ebner
2026-11-23 17:44 ` applied: [PATCH-SERIES manager 0/2] ui: guest identity: small improvements Thomas Lamprecht

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