diff --git a/app.js b/app.js index cc9c087..f564f01 100644 --- a/app.js +++ b/app.js @@ -345,10 +345,22 @@ router.on('/login', async () => {
`; + const _blPass = document.getElementById('bl-pass'); + const _blToggle = document.getElementById('bl-pass-toggle'); + if (_blToggle && _blPass) _blToggle.addEventListener('click', () => { + const show = _blPass.type === 'password'; + _blPass.type = show ? 'text' : 'password'; + _blToggle.style.opacity = show ? '1' : '0.5'; + }); document.getElementById('login-form').addEventListener('submit', async (e) => { e.preventDefault(); const fd = new FormData(e.target);