Release v2.1: GDPR, passkeys, session management, admin redesign

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-07 02:43:57 +03:00
parent d4f0eaa7d9
commit 0a51001791
32 changed files with 1529 additions and 193 deletions
+24
View File
@@ -0,0 +1,24 @@
document.addEventListener("DOMContentLoaded", () => {
const banner = document.getElementById("cookieBanner");
const acceptBtn = document.getElementById("cookieAcceptBtn");
const rejectBtn = document.getElementById("cookieRejectBtn");
if (!banner) return;
const consent = localStorage.getItem("photohost_cookie_consent");
if (!consent) {
banner.hidden = false;
}
async function saveConsent(analytics) {
await fetch("/legal/cookie-consent", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ essential: true, analytics }),
});
localStorage.setItem("photohost_cookie_consent", analytics ? "all" : "essential");
banner.hidden = true;
}
acceptBtn?.addEventListener("click", () => saveConsent(true));
rejectBtn?.addEventListener("click", () => saveConsent(false));
});