Ask for password before resetting settings

This commit is contained in:
Cohee
2024-04-10 22:34:51 +03:00
parent 2306a4e34d
commit 01a4aa51f7
5 changed files with 27 additions and 2 deletions

View File

@ -263,4 +263,13 @@ function configureDiscreetLogin() {
}
document.getElementById('shadow_popup').style.opacity = '';
$('#cancelRecovery').on('click', onCancelRecoveryClick);
$(document).on('keydown', (evt) => {
if (evt.key === 'Enter' && document.activeElement.tagName === 'INPUT') {
if ($('#passwordRecoveryBlock').is(':visible')) {
$('#sendRecovery').trigger('click');
} else {
$('#loginButton').trigger('click');
}
}
});
})();