]> git.proxmox.com Git - proxmox-backup.git/blobdiff - www/MainView.js
buildsys: fix targets to not run dpkg-buildpackage 4 times
[proxmox-backup.git] / www / MainView.js
index cb7a81df7843908b02c542a9f2656f3868be1756..c5764b1febf7d3eb969f0afb22a07e004dc0ad18 100644 (file)
@@ -125,7 +125,7 @@ Ext.define('PBS.MainView', {
        },
 
        control: {
-           'button[reference=logoutButton]': {
+           '[reference=logoutButton]': {
                click: 'logout'
            }
        },
@@ -134,7 +134,7 @@ Ext.define('PBS.MainView', {
            var me = this;
 
            PBS.data.RunningTasksStore.startUpdate();
-           me.lookupReference('usernameinfo').update({username:Proxmox.UserName});
+           me.lookupReference('usernameinfo').setText(Proxmox.UserName);
 
            // show login on requestexception
            // fixme: what about other errors
@@ -190,7 +190,7 @@ Ext.define('PBS.MainView', {
                type: 'hbox',
                align: 'middle'
            },
-           margin: '2 5 2 5',
+           margin: '2 0 2 5',
            height: 38,
            items: [
                {
@@ -198,7 +198,8 @@ Ext.define('PBS.MainView', {
                    prefix: '',
                },
                {
-                   xtype: 'versioninfo'
+                   padding: '0 0 0 5',
+                   xtype: 'versioninfo',
                },
                {
                    padding: 5,
@@ -209,12 +210,6 @@ Ext.define('PBS.MainView', {
                    flex: 1,
                    baseCls: 'x-plain',
                },
-               {
-                   baseCls: 'x-plain',
-                   reference: 'usernameinfo',
-                   padding: '0 5',
-                   tpl: Ext.String.format(gettext("You are logged in as {0}"), "'{username}'")
-               },
                {
                    xtype: 'button',
                    baseCls: 'x-btn',
@@ -225,11 +220,27 @@ Ext.define('PBS.MainView', {
                    margin: '0 5 0 0',
                },
                {
-                   reference: 'logoutButton',
+                   xtype: 'pbsTaskButton',
+                   margin: '0 5 0 0',
+               },
+               {
                    xtype: 'button',
-                   iconCls: 'fa fa-sign-out',
-                   text: gettext('Logout')
-               }
+                   reference: 'usernameinfo',
+                   style: {
+                       // proxmox dark grey p light grey as border
+                       backgroundColor: '#464d4d',
+                       borderColor: '#ABBABA'
+                   },
+                   margin: '0 5 0 0',
+                   iconCls: 'fa fa-user',
+                   menu: [
+                       {
+                           reference: 'logoutButton',
+                           iconCls: 'fa fa-sign-out',
+                           text: gettext('Logout'),
+                       },
+                   ],
+               },
            ]
        },
        {