From 63e72a22e0f67b7c27413ee89c75a297ec0985c4 Mon Sep 17 00:00:00 2001 From: KernelDeimos Date: Sun, 5 May 2024 23:35:17 -0400 Subject: [PATCH] Fix settings card update --- src/UI/Settings/UITabSecurity.js | 6 +++++- src/UI/UIWindow2FASetup.js | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/UI/Settings/UITabSecurity.js b/src/UI/Settings/UITabSecurity.js index 5b7e3395..8ffc5ef2 100644 --- a/src/UI/Settings/UITabSecurity.js +++ b/src/UI/Settings/UITabSecurity.js @@ -28,7 +28,7 @@ export default { // configure 2FA if(!user.is_temp){ - h += `
`; + h += `
`; h += `
`; h += `${i18n('two_factor')}`; h += `${ @@ -54,6 +54,8 @@ export default { $el_window.find('.enable-2fa').hide(); $el_window.find('.disable-2fa').show(); $el_window.find('.user-otp-state').text(i18n('two_factor_enabled')); + $el_window.find('.settings-card-security').removeClass('settings-card-warning'); + $el_window.find('.settings-card-security').addClass('settings-card-success'); } return; @@ -109,6 +111,8 @@ export default { $el_window.find('.enable-2fa').show(); $el_window.find('.disable-2fa').hide(); $el_window.find('.user-otp-state').text(i18n('two_factor_disabled')); + $el_window.find('.settings-card-security').removeClass('settings-card-success'); + $el_window.find('.settings-card-security').addClass('settings-card-warning'); }); } } \ No newline at end of file diff --git a/src/UI/UIWindow2FASetup.js b/src/UI/UIWindow2FASetup.js index 531994ce..6d432311 100644 --- a/src/UI/UIWindow2FASetup.js +++ b/src/UI/UIWindow2FASetup.js @@ -117,7 +117,7 @@ const UIWindow2FASetup = async function UIWindow2FASetup () { async [`property.value`] (value, { component }) { console.log('value? ', value) - if ( false && ! await check_code_(value) ) { + if ( ! await check_code_(value) ) { component.set('error', 'Invalid code'); return; }