From 60faae85c91caef161b876bf211af380ba4a545a Mon Sep 17 00:00:00 2001 From: yoannmultigaming Date: Tue, 24 Nov 2026 20:54:48 +0100 Subject: [PATCH] =?UTF-8?q?AP=20manageur=20V1.1=20(B=C3=AAta)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/index.html b/index.html index f991628..677d12a 100644 --- a/index.html +++ b/index.html @@ -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; }