forked from atums.world/backend
add login view password, make sure it checks if your logged in, vscode recommends exts
This commit is contained in:
parent
b40c1db189
commit
7ddd7fa7a1
5 changed files with 65 additions and 3 deletions
|
@ -35,3 +35,18 @@ if (loginForm) {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
const passwordInput = document.getElementById("password");
|
||||
const togglePassword = document.getElementById("toggle-password");
|
||||
|
||||
togglePassword.addEventListener("click", () => {
|
||||
if (passwordInput.type === "password") {
|
||||
passwordInput.type = "text";
|
||||
togglePassword.innerHTML =
|
||||
'<path d="M12 4.5c-5 0-9.27 3.11-11 7.5 1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zm0 13c-3.03 0-5.5-2.47-5.5-5.5s2.47-5.5 5.5-5.5 5.5 2.47 5.5 5.5-2.47 5.5-5.5 5.5z"/>';
|
||||
} else {
|
||||
passwordInput.type = "password";
|
||||
togglePassword.innerHTML =
|
||||
'<path d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zm0 13c-3.03 0-5.5-2.47-5.5-5.5s2.47-5.5 5.5-5.5 5.5 2.47 5.5 5.5-2.47 5.5-5.5 5.5zm0-9a3.5 3.5 0 100 7 3.5 3.5 0 000-7z"/>';
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue