From 4c0a8bc054aff7fdee69c017c5cf272cf9d04348 Mon Sep 17 00:00:00 2001 From: Christoph Heiss Date: Thu, 22 Aug 2024 13:08:36 +0200 Subject: [PATCH] ui: user view: disable 'Unlock TFA' button by default Without this, the button is enabled if no entry at all is selected (e.g. when switching to the 'User Management' tab), with the button then (obviously) being a noop. Signed-off-by: Christoph Heiss --- www/config/UserView.js | 1 + 1 file changed, 1 insertion(+) diff --git a/www/config/UserView.js b/www/config/UserView.js index 19dce06f..812cad39 100644 --- a/www/config/UserView.js +++ b/www/config/UserView.js @@ -186,6 +186,7 @@ Ext.define('PBS.config.UserView', { xtype: 'proxmoxButton', text: gettext('Unlock TFA'), handler: 'unlockTfa', + disabled: true, enableFn: ({ data }) => data['totp-locked'] || (data['tfa-locked-until'] > (new Date().getTime() / 1000)), },