Hi,
I tried your idea. I couldn't run your demo as i'm working on an older version on NT on this machine.
I added a button after the password on my login screen.
I mucked around with CSS so it sat nicely to the right.
Desktop Text: '<i class="far fa-eye" id="togglePasswordIcon"></i>'
No jquery styling
onClick(): 'togglePassword();'
I have my own JS file for bits and pieces just like this, i added:
function togglePassword() {
const togglePassword = document.querySelector('#togglePasswordIcon');
const password = document.querySelector('#lPassword');
const type = password.getAttribute('type') === 'password' ? 'text' : 'password';
password.setAttribute('type', type);
togglePassword.classList.toggle('fa-eye-slash');
};
lPassword is my password field, i think yours was loc__password.
Regards
Bill