mirror of
https://github.com/HeyPuter/puter
synced 2024-11-15 06:15:47 +00:00
Fix settings card update
This commit is contained in:
parent
00c8ece07e
commit
63e72a22e0
@ -28,7 +28,7 @@ export default {
|
|||||||
|
|
||||||
// configure 2FA
|
// configure 2FA
|
||||||
if(!user.is_temp){
|
if(!user.is_temp){
|
||||||
h += `<div class="settings-card ${user.otp ? 'settings-card-success' : 'settings-card-warning'}">`;
|
h += `<div class="settings-card settings-card-security ${user.otp ? 'settings-card-success' : 'settings-card-warning'}">`;
|
||||||
h += `<div>`;
|
h += `<div>`;
|
||||||
h += `<strong style="display:block;">${i18n('two_factor')}</strong>`;
|
h += `<strong style="display:block;">${i18n('two_factor')}</strong>`;
|
||||||
h += `<span class="user-otp-state" style="display:block; margin-top:5px;">${
|
h += `<span class="user-otp-state" style="display:block; margin-top:5px;">${
|
||||||
@ -54,6 +54,8 @@ export default {
|
|||||||
$el_window.find('.enable-2fa').hide();
|
$el_window.find('.enable-2fa').hide();
|
||||||
$el_window.find('.disable-2fa').show();
|
$el_window.find('.disable-2fa').show();
|
||||||
$el_window.find('.user-otp-state').text(i18n('two_factor_enabled'));
|
$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;
|
return;
|
||||||
@ -109,6 +111,8 @@ export default {
|
|||||||
$el_window.find('.enable-2fa').show();
|
$el_window.find('.enable-2fa').show();
|
||||||
$el_window.find('.disable-2fa').hide();
|
$el_window.find('.disable-2fa').hide();
|
||||||
$el_window.find('.user-otp-state').text(i18n('two_factor_disabled'));
|
$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');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -117,7 +117,7 @@ const UIWindow2FASetup = async function UIWindow2FASetup () {
|
|||||||
async [`property.value`] (value, { component }) {
|
async [`property.value`] (value, { component }) {
|
||||||
console.log('value? ', value)
|
console.log('value? ', value)
|
||||||
|
|
||||||
if ( false && ! await check_code_(value) ) {
|
if ( ! await check_code_(value) ) {
|
||||||
component.set('error', 'Invalid code');
|
component.set('error', 'Invalid code');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user