]> git.proxmox.com Git - pmg-gui.git/commitdiff
user view: disable unlock TFA button initially
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 28 Jun 2023 09:32:48 +0000 (11:32 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 28 Jun 2023 09:32:51 +0000 (11:32 +0200)
set the initial state to disabled and let the selection model, which
is backing the enableFn, handle it when actually selected, like the
other buttons here.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
js/UserView.js

index c6b46737e19c88c7cafbfda67107eb9b5e0e6835..d82b49e2b96ea76ee2834cbc61f3eaf01c2a0035 100644 (file)
@@ -145,6 +145,7 @@ Ext.define('PMG.UserView', {
            xtype: 'proxmoxButton',
            text: gettext('Unlock TFA'),
            handler: 'onUnlockTfa',
+           disabled: true,
            enableFn: ({ data }) =>
                data['totp-locked'] || (data['tfa-locked-until'] > (new Date().getTime() / 1000)),
        },