feat: replace account actions with menu

This commit is contained in:
2026-07-29 23:25:49 -04:00
parent 089ee6916f
commit 8f82000e31
3 changed files with 1356 additions and 380 deletions
+2 -7
View File
@@ -690,13 +690,8 @@ async function init() {
fetch("/api/auth/me")
.then((r) => (r.ok ? r.json() : null))
.then((body) => {
if (body?.user?.role === "admin") {
const button = document.getElementById("btn-admin");
button.classList.remove("hidden");
button.onclick = () => {
location.href = "/admin";
};
}
if (body?.user?.role === "admin")
document.getElementById("menu-admin").classList.remove("hidden");
})
.catch(() => {});
initPrefillPanel({