[pve-devel] [PATCH widget-toolkit v7 2/3] add class for 'admin' tags
Dominik Csapak
d.csapak at proxmox.com
Tue Jun 21 11:19:55 CEST 2022
when a tag starts with '+', we want to emphasize it, so it's clear that
it's an 'admin' tag, do this by making the font bold
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
src/Utils.js | 4 ++++
src/css/ext6-pmx.css | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/src/Utils.js b/src/Utils.js
index eb13838..7d490c0 100644
--- a/src/Utils.js
+++ b/src/Utils.js
@@ -1360,6 +1360,10 @@ utilities: {
let txtCls = Proxmox.Utils.getTextContrastClass(rgb);
cls = `proxmox-tag-${txtCls}`;
}
+
+ if (string[0] === '+') {
+ cls += ' admin-tag';
+ }
return `<span class="${cls}" style="${style}">${string}</span>`;
},
},
diff --git a/src/css/ext6-pmx.css b/src/css/ext6-pmx.css
index 3e0f04f..486de18 100644
--- a/src/css/ext6-pmx.css
+++ b/src/css/ext6-pmx.css
@@ -6,6 +6,10 @@
background-color: LightYellow;
}
+.admin-tag {
+ font-weight: bold;
+}
+
.proxmox-tags-full .proxmox-tag-light,
.proxmox-tags-full .proxmox-tag-dark {
border-radius: 3px;
--
2.30.2
More information about the pve-devel
mailing list