AP manageur V1.1 (Bêta)
This commit is contained in:
1 parent
0468b39b10
commit
60faae85c9
1 file changed
+43
+43
@@ -8108,6 +8108,13 @@
|
||||
if (!setup) { if ($('authUsername')) $('authUsername').value = localStorage.getItem('apRememberedUser') || ''; if ($('rememberUser')) $('rememberUser').checked = !!localStorage.getItem('apRememberedUser') }
|
||||
else { if ($('authUsername')) $('authUsername').value = ''; if ($('rememberUser')) $('rememberUser').checked = false; }
|
||||
hideLoaderScreen();
|
||||
setTimeout(() => {
|
||||
if ($('authUsername') && $('authUsername').value.trim()) {
|
||||
if ($('authPassword')) $('authPassword').focus();
|
||||
} else if ($('authUsername')) {
|
||||
$('authUsername').focus();
|
||||
}
|
||||
}, 50);
|
||||
}
|
||||
|
||||
function showApp() {
|
||||
@@ -14058,6 +14065,42 @@ ${vpnBadgeTopo}
|
||||
} catch (e) { message.textContent = tErr(e.message); }
|
||||
};
|
||||
|
||||
if ($('authUsername')) {
|
||||
$('authUsername').addEventListener('keydown', (e) => {
|
||||
if (e.key === ' ' || e.code === 'Space') {
|
||||
e.preventDefault();
|
||||
if ($('authPassword')) {
|
||||
$('authPassword').focus();
|
||||
$('authPassword').select();
|
||||
}
|
||||
} else if (e.key === 'Enter') {
|
||||
e.preventDefault();
|
||||
if ($('authPassword')) {
|
||||
$('authPassword').focus();
|
||||
$('authPassword').select();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if ($('authPassword')) {
|
||||
$('authPassword').addEventListener('keydown', (e) => {
|
||||
if (e.key === 'Enter') {
|
||||
e.preventDefault();
|
||||
if ($('authSubmit')) $('authSubmit').click();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if ($('authOtp')) {
|
||||
$('authOtp').addEventListener('keydown', (e) => {
|
||||
if (e.key === 'Enter') {
|
||||
e.preventDefault();
|
||||
if ($('authSubmit')) $('authSubmit').click();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$('saveAuth').onclick = () => runAction(async () => {
|
||||
const message = $('authSettingsMessage'); const password = $('authSettingsPassword').value; const confirmation = $('authSettingsPasswordConfirm').value;
|
||||
if (password !== confirmation) { message.textContent = tErr('Erreur : les mots de passe ne correspondent pas'); return; }
|
||||
|
||||
Reference in new issue
Block a user