]> git.proxmox.com Git - pmg-gui.git/blobdiff - js/MainView.js
tfa: avoid trailing space on WebAuthn
[pmg-gui.git] / js / MainView.js
index 0382d1f18ab2b65ca622749367fb473273a08465..7c12ecefff8e6014b8661fa5944a2acd94770c9f 100644 (file)
@@ -153,7 +153,7 @@ Ext.define('PMG.MainView', {
 
            // select treeitem and load page from url fragment
            let token = Ext.util.History.getToken() || 'pmgDashboard';
-           this.redirectTo(token, true);
+           this.redirectTo(token, { force: true });
        },
     },
 
@@ -203,6 +203,19 @@ Ext.define('PMG.MainView', {
                    margin: '0 5 0 0',
                    iconCls: 'fa fa-user',
                    menu: [
+                       {
+                           iconCls: 'fa fa-gear',
+                           text: gettext('My Settings'),
+                           handler: () => Ext.create('PMG.window.Settings').show(),
+                       },
+                       {
+                           iconCls: 'fa fa-paint-brush',
+                           text: gettext('Color Theme'),
+                           handler: () => Ext.create('Proxmox.window.ThemeEditWindow', {
+                               cookieName: 'PMGThemeCookie',
+                               autoShow: true,
+                           }),
+                       },
                        {
                            iconCls: 'fa fa-language',
                            text: gettext('Language'),
@@ -227,21 +240,23 @@ Ext.define('PMG.MainView', {
                type: 'vbox',
                align: 'stretch',
            },
-           items: [{
-               xtype: 'navigationtree',
-               minWidth: 180,
-               reference: 'navtree',
-               // we have to define it here until extjs 6.2
-               // because of a bug where a viewcontroller does not detect
-               // the selectionchange event of a treelist
-               listeners: {
-                   selectionchange: 'navigate',
+           items: [
+               {
+                   xtype: 'navigationtree',
+                   minWidth: 180,
+                   reference: 'navtree',
+                   // we have to define it here until extjs 6.2 because of a bug where a
+                   // viewcontroller does not detect the selectionchange event of a treelist
+                   listeners: {
+                       selectionchange: 'navigate',
+                   },
                },
-           }, {
-               xtype: 'box',
-               cls: 'x-treelist-pve-nav',
-               flex: 1,
-           }],
+               {
+                   xtype: 'box',
+                   cls: 'x-treelist-pve-nav',
+                   flex: 1,
+               },
+           ],
        },
        {
            xtype: 'panel',