feat(auth): implement user and device authentication

This commit is contained in:
QiuSW
2026-07-26 15:18:48 +08:00
parent c5d3b215ff
commit 49db5b8305
66 changed files with 6216 additions and 271 deletions
@@ -9,6 +9,19 @@
if (summary) summary.focus();
}
const passwordToggle = document.querySelector("[data-password-toggle]");
if (passwordToggle) {
const password = document.getElementById(
passwordToggle.getAttribute("aria-controls"),
);
passwordToggle.addEventListener("click", () => {
const showing = password.type === "text";
password.type = showing ? "password" : "text";
passwordToggle.textContent = showing ? "显示" : "隐藏";
passwordToggle.setAttribute("aria-pressed", String(!showing));
});
}
document.querySelectorAll("[data-loading-form]").forEach((form) => {
form.addEventListener("submit", () => {
form.setAttribute("aria-busy", "true");