add login view password, make sure it checks if your logged in, vscode recommends exts

This commit is contained in:
creations 2025-03-18 23:24:06 -04:00
parent b40c1db189
commit 7ddd7fa7a1
Signed by: creations
GPG key ID: 8F553AA4320FC711
5 changed files with 65 additions and 3 deletions

View file

@ -116,6 +116,37 @@
width: 100%;
}
.password-group {
position: relative;
width: 100%;
}
.password-wrapper {
position: relative;
width: 100%;
}
.password-wrapper input {
width: 100%;
padding-right: 2rem;
}
.toggle-password {
position: absolute;
right: 10px;
top: 50%;
transform: translateY(-50%);
cursor: pointer;
width: 20px;
height: 20px;
fill: var(--text-secondary);
transition: fill 0.2s;
}
.toggle-password:hover {
fill: var(--accent);
}
.error-message {
color: var(--error);
background-color: rgb(237 66 69 / 10%);

View file

@ -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"/>';
}
});