feat: implement password authentication

This commit is contained in:
insects 2025-03-11 01:54:56 +01:00
parent 498ecdf68b
commit 62a329aebd
5 changed files with 55 additions and 5 deletions

View file

@ -7,11 +7,20 @@ function checkPwd() {
to_show.forEach(el => {
el.classList.add("shown");
});
const to_hide = document.querySelectorAll(".no_pwd");
to_hide.forEach(el => {
el.classList.add("hidden");
});
const buttons = document.querySelectorAll(".action button");
buttons.forEach(btn => {
const oldUrl= btn.getAttribute("hx-post");
btn.setAttribute("hx-post", `${oldUrl}&pwd=${pwd}`);
});
const pwd_el = document.getElementById("password");
pwd_el.innerHTML = pwd;
}
}