]> git.proxmox.com Git - pve-manager.git/blobdiff - www/manager6/Workspace.js
ui: fix align mode of two column container
[pve-manager.git] / www / manager6 / Workspace.js
index 78ab37b6bff262d198fa6447d9ba551b6af4a916..52c66108ca247b39adae21c281239ab3480e2a02 100644 (file)
@@ -382,6 +382,7 @@ Ext.define('PVE.StdWorkspace', {
                                    handler: function() {
                                        var win = Ext.create('Proxmox.window.PasswordEdit', {
                                            userid: Proxmox.UserName,
+                                           confirmCurrentPassword: Proxmox.UserName !== 'root@pam',
                                        });
                                        win.show();
                                    },
@@ -397,7 +398,7 @@ Ext.define('PVE.StdWorkspace', {
                                },
                                {
                                    iconCls: 'fa fa-paint-brush',
-                                   text: gettext('Theme'),
+                                   text: gettext('Color Theme'),
                                    handler: function() {
                                        Ext.create('Proxmox.window.ThemeEditWindow')
                                            .show();
@@ -469,8 +470,8 @@ Ext.define('PVE.StdWorkspace', {
                                selview,
                                {
                                    xtype: 'button',
-                                   cls: 'x-btn-default-toolbar-small proxmox-inline-button',
-                                   iconCls: 'fa fa-fw fa-gear x-btn-icon-el-default-toolbar-small ',
+                                   cls: 'x-btn-default-toolbar-small',
+                                   iconCls: 'fa fa-fw fa-gear x-btn-icon-el-default-toolbar-small',
                                    handler: () => {
                                        Ext.create('PVE.window.TreeSettingsEdit', {
                                            autoShow: true,
@@ -485,7 +486,7 @@ Ext.define('PVE.StdWorkspace', {
                    listeners: {
                        resize: function(panel, width, height) {
                            var viewWidth = me.getSize().width;
-                           if (width > viewWidth - 100) {
+                           if (width > viewWidth - 100 && viewWidth > 150) {
                                panel.setWidth(viewWidth - 100);
                            }
                        },
@@ -506,7 +507,7 @@ Ext.define('PVE.StdWorkspace', {
                    listeners: {
                        resize: function(panel, width, height) {
                            var viewHeight = me.getSize().height;
-                           if (height > viewHeight - 150) {
+                           if (height > viewHeight - 150 && viewHeight > 200) {
                                panel.setHeight(viewHeight - 150);
                            }
                        },
@@ -526,6 +527,35 @@ Ext.define('PVE.StdWorkspace', {
                modalWindows.forEach(win => win.alignTo(me, 'c-c'));
            }
        });
+
+       let tagSelectors = [];
+       ['circle', 'dense'].forEach((style) => {
+           ['dark', 'light'].forEach((variant) => {
+               tagSelectors.push(`.proxmox-tags-${style} .proxmox-tag-${variant}`);
+           });
+       });
+
+       Ext.create('Ext.tip.ToolTip', {
+           target: me.el,
+           delegate: tagSelectors.join(', '),
+           trackMouse: true,
+           renderTo: Ext.getBody(),
+           border: 0,
+           minWidth: 0,
+           padding: 0,
+           bodyBorder: 0,
+           bodyPadding: 0,
+           dismissDelay: 0,
+           userCls: 'pmx-tag-tooltip',
+           shadow: false,
+           listeners: {
+               beforeshow: function(tip) {
+                   let tag = Ext.htmlEncode(tip.triggerElement.innerHTML);
+                   let tagEl = Proxmox.Utils.getTagElement(tag, PVE.UIOptions.tagOverrides);
+                   tip.update(`<span class="proxmox-tags-full">${tagEl}</span>`);
+               },
+           },
+       });
     },
 });