]> git.proxmox.com Git - proxmox-widget-toolkit.git/blobdiff - src/panel/TfaView.js
tfa view: fix WebAuthn casing
[proxmox-widget-toolkit.git] / src / panel / TfaView.js
index 712cdfe131871326b268f4d62bd060a442e461ef..e7a09a93a748170df5cde653409bfe14c37fa3ec 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) {
@@ -234,7 +230,7 @@ Ext.define('Proxmox.panel.TfaView', {
            width: 150,
            sortable: true,
            dataIndex: 'created',
-           renderer: Proxmox.Utils.render_timestamp,
+           renderer: t => !t ? 'N/A' : Proxmox.Utils.render_timestamp(t),
        },
        {
            header: gettext('Description'),
@@ -260,7 +256,7 @@ Ext.define('Proxmox.panel.TfaView', {
                        handler: 'addTotp',
                    },
                    {
-                       text: gettext('Webauthn'),
+                       text: gettext('WebAuthn'),
                        itemId: 'webauthn',
                        iconCls: 'fa fa-fw fa-shield',
                        handler: 'addWebauthn',
@@ -272,9 +268,9 @@ Ext.define('Proxmox.panel.TfaView', {
                        handler: 'addRecovery',
                    },
                    {
-                       text: gettext('Yubico'),
+                       text: gettext('Yubico OTP'),
                        itemId: 'yubico',
-                       iconCls: 'fa fa-fw fa-yahoo',
+                       iconCls: 'fa fa-fw fa-yahoo', // close enough
                        handler: 'addYubico',
                        cbind: {
                            hidden: '{!yubicoEnabled}',