примерно получилось

This commit is contained in:
2026-02-25 22:44:27 +05:00
parent 5b536dfbe3
commit 0e838358f0
5 changed files with 2173 additions and 1 deletions

View File

@@ -128,6 +128,16 @@ if (currentUser && currentUser.role === 'admin') {
id: "admin-btn"
});
}
// 👇 Кнопка админ-панели ТОЛЬКО для admin 👇
if (currentUser && currentUser.role === 'admin') {
navButtons.push({
onclick: "window.location.href = '/client.html'",
className: "nav-btn profile",
icon: "fas fa-cog",
text: "client",
id: "admin-btn"
});
}
// Кнопка выхода
navButtons.push({
onclick: "logout()",