remove the quick theme switcher if admin settings are overridden

This commit is contained in:
dswbx
2024-12-03 17:09:27 +01:00
parent 91470d530f
commit 5374afc9c8

View File

@@ -146,6 +146,7 @@ export function Header({ hasSidebar = true }) {
} }
function UserMenu() { function UserMenu() {
const { adminOverride } = useBknd();
const auth = useAuth(); const auth = useAuth();
const [navigate] = useNavigate(); const [navigate] = useNavigate();
const { logout_route } = useBkndWindowContext(); const { logout_route } = useBkndWindowContext();
@@ -170,7 +171,9 @@ function UserMenu() {
items.push({ label: `Logout ${auth.user.email}`, onClick: handleLogout, icon: IconKeyOff }); items.push({ label: `Logout ${auth.user.email}`, onClick: handleLogout, icon: IconKeyOff });
} }
if (!adminOverride) {
items.push(() => <UserMenuThemeToggler />); items.push(() => <UserMenuThemeToggler />);
}
return ( return (
<> <>