]> git.proxmox.com Git - proxmox-widget-toolkit.git/commitdiff
TFA panel: code/style cleanup
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 11 Nov 2021 18:53:55 +0000 (19:53 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 11 Nov 2021 18:53:55 +0000 (19:53 +0100)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/panel/TfaView.js

index 0b477ef1e58e0ff0a58276123a4e2a3d05f3bdad..8c2af96f6be5577bd3f1145188ef111e5eb6e9e9 100644 (file)
@@ -105,24 +105,22 @@ Ext.define('Proxmox.panel.TfaView', {
 
            Ext.create('Proxmox.window.AddWebauthn', {
                isCreate: true,
+               autoShow: true,
                listeners: {
-                   destroy: function() {
-                       me.reload();
-                   },
+                   destroy: () => me.reload(),
                },
-           }).show();
+           });
        },
 
        addRecovery: async function() {
            let me = this;
 
            Ext.create('Proxmox.window.AddTfaRecovery', {
+               autoShow: true,
                listeners: {
-                   destroy: function() {
-                       me.reload();
-                   },
+                   destroy: () => me.reload(),
                },
-           }).show();
+           });
        },
 
        addYubico: function() {
@@ -130,12 +128,11 @@ Ext.define('Proxmox.panel.TfaView', {
 
            Ext.create('Proxmox.window.AddYubico', {
                isCreate: true,
+               autoShow: true,
                listeners: {
-                   destroy: function() {
-                       me.reload();
-                   },
+                   destroy: () => me.reload(),
                },
-           }).show();
+           });
        },
 
        editItem: function() {
@@ -148,12 +145,11 @@ Ext.define('Proxmox.panel.TfaView', {
 
            Ext.create('Proxmox.window.TfaEdit', {
                'tfa-id': selection[0].data.fullid,
+               autoShow: true,
                listeners: {
-                   destroy: function() {
-                       me.reload();
-                   },
+                   destroy: () => me.reload(),
                },
-           }).show();
+           });
        },
 
        renderUser: fullid => fullid.split('/')[0],
@@ -172,8 +168,8 @@ Ext.define('Proxmox.panel.TfaView', {
            Ext.create('Proxmox.tfa.confirmRemove', {
                ...record.data,
                callback: password => me.removeItem(password, record),
-           })
-           .show();
+               autoShow: true,
+           });
        },
 
        removeItem: async function(password, record) {