demo.filerise.net

This commit is contained in:
Ryan
2025-04-04 19:27:01 -04:00
committed by GitHub
parent a2d678ee19
commit 58db1d49ac

36
auth.js
View File

@@ -127,26 +127,28 @@ function updateAuthenticatedUI(data) {
if (adminPanelBtn) adminPanelBtn.style.display = "none"; if (adminPanelBtn) adminPanelBtn.style.display = "none";
} }
let userPanelBtn = document.getElementById("userPanelBtn"); if (window.location.hostname !== "demo.filerise.net") {
if (!userPanelBtn) { let userPanelBtn = document.getElementById("userPanelBtn");
userPanelBtn = document.createElement("button"); if (!userPanelBtn) {
userPanelBtn.id = "userPanelBtn"; userPanelBtn = document.createElement("button");
userPanelBtn.classList.add("btn", "btn-user"); userPanelBtn.id = "userPanelBtn";
userPanelBtn.innerHTML = '<i class="material-icons" title="User Panel">account_circle</i>'; userPanelBtn.classList.add("btn", "btn-user");
let adminPanelBtn = document.getElementById("adminPanelBtn"); userPanelBtn.innerHTML = '<i class="material-icons" title="User Panel">account_circle</i>';
if (adminPanelBtn) { let adminPanelBtn = document.getElementById("adminPanelBtn");
insertAfter(userPanelBtn, adminPanelBtn); if (adminPanelBtn) {
} else { insertAfter(userPanelBtn, adminPanelBtn);
const firstButton = headerButtons.firstElementChild;
if (firstButton) {
insertAfter(userPanelBtn, firstButton);
} else { } else {
headerButtons.appendChild(userPanelBtn); const firstButton = headerButtons.firstElementChild;
if (firstButton) {
insertAfter(userPanelBtn, firstButton);
} else {
headerButtons.appendChild(userPanelBtn);
}
} }
userPanelBtn.addEventListener("click", openUserPanel);
} else {
userPanelBtn.style.display = "block";
} }
userPanelBtn.addEventListener("click", openUserPanel);
} else {
userPanelBtn.style.display = "block";
} }
updateItemsPerPageSelect(); updateItemsPerPageSelect();